亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tpcal.c

?? 可以在msdos下用bc3編譯通過的, 上面1中的代碼是無法編譯通過的, 在MSDOS下學習的可以下載這個版本, 可以省去不少在MSDOS編譯時的痛苦時光.
?? C
字號:
/* * Touch-panel calibration program * Copyright (C) 1999 Bradley D. LaRonde <brad@ltc.com> * * This program is free software; you may redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include <stdio.h>#include <errno.h>#include <stdlib.h>#include <time.h>#include <string.h>#include "windows.h"#include "mou_tp.h"#include "transform.h"static int xext, yext;static CALIBRATION_PAIRS cps;static CALIBRATION_PAIR* pcp = 0;void DrawAbout(HDC hdc, RECT r){	const int ver_major = 0;	const int ver_minor = 5;	const char app_name[] = "Touch Panel Calibrator";	const char title[] = "%s, version %d.%d";	const char copyright[] = "(C) 1999 Bradley D. LaRonde <brad@ltc.com>";	const char warranty[] = "ABSOLUTELY NO WARRANTY";	const char license1[] = "This is free software, and you are welcome to";	const char license2[] = "redistribute it under certain conditions.";	const int leading = 15;	char s[1024];	sprintf(s, title, app_name, ver_major, ver_minor);	SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT));	DrawText(hdc, s, -1, &r, DT_CENTER);	r.top += leading;	DrawText(hdc, copyright, -1, &r, DT_CENTER);	r.top += leading;	DrawText(hdc, warranty, -1, &r, DT_CENTER);	r.top += leading;	DrawText(hdc, license1, -1, &r, DT_CENTER);	r.top += leading;	DrawText(hdc, license2, -1, &r, DT_CENTER);}void DrawDone(HDC hdc, RECT r){        const char donemsg[] = "Calibration is done!";	SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT));        DrawText(hdc, donemsg, -1, &r, DT_CENTER);}void DrawTarget(HDC hdc, POINT p){	const int scale = 9;	const int center = 3;	// I never knew that Windows GDI always leaves off	// the last point in a line, and the right and bottom side of a rectangle.	// Why would they make use always figure +1?  It isn't always obvious where	// +1 is (i.e. a line going at a 10 degree angle).  Blech.	// I can only hope that there is some overwhelmingly compelling reason why.	Rectangle(hdc, p.x - center, p.y - center, p.x + center + 1, p.y + center + 1);	// scale	MoveToEx(hdc, p.x - scale, p.y, NULL);	LineTo(hdc, p.x + scale + 1, p.y);	MoveToEx(hdc, p.x, p.y - scale, NULL);	LineTo(hdc, p.x, p.y + scale + 1);}void DrawLabelAlign(HDC hdc, POINT p, LPCSTR psz, int align){	RECT r;	const int w = 180;	const int h = 14;	const int m = 15;	switch(align)	{		case 1:			// right			r.left = p.x + m;			r.right = p.x + w + m;			r.top =  p.y - (h/2);			r.bottom = p.y + (h/2);			break;		case 2:			// left			r.left = p.x - (w + m);			r.right = p.x - m;			r.top =  p.y - (h/2);			r.bottom = p.y + (h/2);			break;		case 3:			// below			r.left = p.x - (w/2);			r.right = p.x + (w/2);			r.top =  p.y + m;			r.bottom = p.y + m + h;			break;		default:			// at			r.left = p.x;			r.right = p.x + w;			r.top =  p.y;			r.bottom = p.y + h;			break;	}	SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT));	DrawText(hdc, psz, -1, &r, DT_LEFT);}void DrawLabel(HDC hdc, POINT p, LPCSTR psz){	if ( p.x < (xext * 1 / 4) )		return DrawLabelAlign(hdc, p, psz, 1);	if ( p.x > (xext * 3 / 4) )		return DrawLabelAlign(hdc, p, psz, 2);	return DrawLabelAlign(hdc, p, psz, 3);}POINT GetTarget(int n){	const int inset = 10;	POINT p; 	switch (n)	{		case 0:			p.x = xext / 2; p.y = yext / 2;			pcp = &cps.center;			break;		case 1:			p.x = inset; p.y = inset;			pcp = &cps.ul;			break;		case 2:			p.x = xext - inset; p.y = inset;			pcp = &cps.ur;			break;		case 3:			p.x = xext - inset; p.y = yext - inset;			pcp = &cps.lr;			break;		case 4:			p.x = inset; p.y = yext - inset;			pcp = &cps.ll;			break;				default:			// return a random target			p.x = random() / (RAND_MAX / xext);			p.y = random() / (RAND_MAX / yext);			pcp = 0;			break;	}	return p;}static int total_targets = 5;static int current_target = 0;static POINT current_target_location;void DoPaint(HDC hdc){	const char szInstructions[] = "Please touch the center of the target.";	POINT p;	int i, n;	int old_rop;	POINT last = current_target_location;	HPEN hOldPen;		if (current_target == total_targets) {		RECT r = {10, yext/2,  xext - 10, yext/2 + 40};		DrawDone(hdc, r);		return;	}		if (current_target == 0)	{		RECT r = {10, yext - 85, xext - 10, yext - 10};		DrawAbout(hdc, r);	}	current_target_location = GetTarget(current_target);	old_rop = SetROP2(hdc, R2_XORPEN);	hOldPen = SelectObject(hdc, GetStockObject(WHITE_PEN));	n = 20;	for (i=0; i < n; i++)	{		p.x = last.x + ((current_target_location.x - last.x) * i / n);		p.y = last.y + ((current_target_location.y - last.y) * i / n);		DrawTarget(hdc, p);		Sleep(60);		DrawTarget(hdc, p);	}	// final position	SetROP2(hdc, R2_COPYPEN);	SelectObject(hdc, GetStockObject(BLACK_PEN));	DrawTarget(hdc, current_target_location);	DrawLabel(hdc, current_target_location, szInstructions);	// put things back	SetROP2(hdc, old_rop);	SelectObject(hdc, hOldPen);}#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp){	PAINTSTRUCT ps;	HDC hdc;  	switch(msg) {		case WM_PAINT:			hdc = BeginPaint(hwnd, &ps);			DoPaint(hdc);			EndPaint(hwnd, &ps);			break;		case WM_NCHITTEST:			return HTCLIENT;		case WM_LBUTTONUP:			if ( pcp != 0 )			{				pcp->screen.x = current_target_location.x * TRANSFORMATION_UNITS_PER_PIXEL;				pcp->screen.y = current_target_location.y * TRANSFORMATION_UNITS_PER_PIXEL;				pcp->device.x = GET_X_LPARAM(lp);				pcp->device.y = GET_Y_LPARAM(lp);			}			if ( ++current_target == total_targets )			{				TRANSFORMATION_COEFFICIENTS tc;#if 0				CalcTransformationCoefficientsSimple(&cps, &tc);				printf("%d %d %d %d %d %d %d\n",					tc.a, tc.b, tc.c, tc.d, tc.e, tc.f, tc.s);				CalcTransformationCoefficientsBetter(&cps, &tc);				printf("%d %d %d %d %d %d %d\n",					tc.a, tc.b, tc.c, tc.d, tc.e, tc.f, tc.s);				CalcTransformationCoefficientsEvenBetter(&cps, &tc);				printf("%d %d %d %d %d %d %d\n",					tc.a, tc.b, tc.c, tc.d, tc.e, tc.f, tc.s);#endif				CalcTransformationCoefficientsBest(&cps, &tc);				printf("%d %d %d %d %d %d %d\n",					tc.a, tc.b, tc.c, tc.d, tc.e, tc.f, tc.s);				InvalidateRect(hwnd, NULL, TRUE);				UpdateWindow(hwnd);				PostQuitMessage(0);				break;			}			InvalidateRect(hwnd, NULL, TRUE);			UpdateWindow(hwnd);			break;		default:			return DefWindowProc(hwnd, msg, wp, lp);	}	return 0;}int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){	WNDCLASS wc;	RECT r;	HWND hwnd;	MSG msg;	MWCOORD big;	srandom(time(NULL));	/* WndButtonRegister(NULL); */	wc.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW;	wc.lpfnWndProc = (WNDPROC)WndProc;	wc.cbClsExtra = 0;	wc.cbWndExtra = 0;	wc.hInstance = 0;	wc.hIcon = 0;	wc.hCursor = 0;	wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);	wc.lpszMenuName = NULL;	wc.lpszClassName = "tpcal";	RegisterClass(&wc);	GetWindowRect(GetDesktopWindow(), &r);	xext = r.right;	yext = r.bottom;	hwnd = CreateWindowEx(0L, "tpcal", "Touch Panel Calibration",		WS_VISIBLE, 0, 0, xext, yext,		NULL, (HMENU)1, NULL, NULL);	// Don't restrict mouse much in order to handle uncalibrated points.	big = 1000000;	GdRestrictMouse(-big, -big, big, big);	// We want all mouse events - even ones outside our window.	SetCapture(hwnd);	while(GetMessage(&msg, NULL, 0, 0)) {		TranslateMessage(&msg);		DispatchMessage(&msg);	}	return 0;}int enable_pointing_coordinate_transform;int MwUserInit(int ac, char** av){	enable_pointing_coordinate_transform = 0;	if ( ac > 1 )		total_targets = atol(av[1]);	return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品少妇一区二区三区| 久久精品水蜜桃av综合天堂| 国产高清久久久| 视频一区中文字幕| 亚洲福利视频一区二区| 亚洲一级二级三级| 亚洲成人一区二区| 午夜精品久久久久久久久久久| 亚洲一二三区视频在线观看| 亚洲一二三区不卡| 日韩不卡在线观看日韩不卡视频| 青青草97国产精品免费观看| 免费在线观看精品| 国产一区二区毛片| 成人精品一区二区三区四区| 丁香婷婷综合网| 97se亚洲国产综合自在线观| 日本久久电影网| 欧美日韩免费视频| 精品99一区二区| 国产欧美精品一区二区色综合| 欧美国产97人人爽人人喊| 亚洲视频1区2区| 日本亚洲三级在线| 高清成人在线观看| 欧美精选一区二区| 国产精品高潮呻吟| 亚洲免费在线看| 蜜桃一区二区三区四区| 国产成人精品亚洲777人妖| 91一区二区三区在线观看| 欧美色精品天天在线观看视频| 欧美一区二区三区思思人| 久久久精品国产免费观看同学| 亚洲久草在线视频| 日本美女一区二区三区| 99综合电影在线视频| 欧美浪妇xxxx高跟鞋交| 国产欧美精品在线观看| 亚洲成人免费看| 国产成人福利片| 精品1区2区3区| 国产精品人妖ts系列视频| 日日夜夜精品视频天天综合网| 成人激情免费电影网址| 777久久久精品| 亚洲精品视频在线观看网站| 国产在线麻豆精品观看| 欧美三级三级三级| 国产精品污网站| 久久精品噜噜噜成人88aⅴ| 91国模大尺度私拍在线视频| 国产色一区二区| 免费观看91视频大全| 在线观看日韩高清av| 国产日产欧美一区| 久久国产人妖系列| 制服视频三区第一页精品| 亚洲人成电影网站色mp4| 成人中文字幕合集| 精品美女一区二区| 蜜桃免费网站一区二区三区| 日本久久电影网| 亚洲精品视频在线观看免费 | 国产精品久久久久久久久免费丝袜 | 成人午夜激情片| 日韩视频一区二区| 日日夜夜精品视频免费| 在线观看91视频| 亚洲免费资源在线播放| 99久久国产免费看| 亚洲欧美激情插| 色噜噜夜夜夜综合网| 伊人开心综合网| 日韩视频在线你懂得| 亚洲一区二区三区国产| 91免费版在线看| 亚洲摸摸操操av| 欧美三级乱人伦电影| 亚洲一区免费观看| 欧美久久久久免费| 麻豆国产精品视频| 精品99999| 麻豆久久久久久| 欧美一区二区在线视频| 免费人成在线不卡| 国产视频一区不卡| 91小视频在线| 亚洲gay无套男同| 日韩亚洲欧美综合| 国产一区二区91| 中文字幕日韩欧美一区二区三区| 国产福利一区二区三区视频在线| 久久免费电影网| 91免费版在线| 免费看欧美女人艹b| 久久亚洲精品小早川怜子| 国产91对白在线观看九色| 亚洲免费大片在线观看| 欧美麻豆精品久久久久久| 久久99热99| 亚洲视频免费在线观看| 日韩午夜激情av| www.av精品| 麻豆91在线看| 中文字幕日本不卡| 这里只有精品电影| 懂色av一区二区三区蜜臀| 亚洲妇熟xx妇色黄| 国产亚洲美州欧州综合国| 色综合久久中文字幕综合网| 日韩电影免费一区| 国产精品天美传媒| 777午夜精品视频在线播放| 大桥未久av一区二区三区中文| 亚洲一区视频在线| 国产欧美日本一区视频| 在线播放日韩导航| 色综合天天综合网天天狠天天 | 国精产品一区一区三区mba桃花 | 国产成人欧美日韩在线电影| 亚洲日本丝袜连裤袜办公室| 精品sm在线观看| 欧美精品第1页| jlzzjlzz欧美大全| 美国十次综合导航| 亚洲一区在线看| 国产精品久久久久久久久免费桃花 | 色综合久久久网| 国产精品影视网| 男男gaygay亚洲| 夜夜嗨av一区二区三区网页| 国产欧美日韩中文久久| 日韩视频一区二区三区在线播放 | 蜜臀av一区二区在线免费观看| 国产精品久久久久久久久图文区 | 成人黄动漫网站免费app| 蜜桃视频在线观看一区| 亚洲国产日韩在线一区模特| 中文字幕永久在线不卡| 欧美国产日韩在线观看| 精品国产制服丝袜高跟| 欧美精品一二三四| 欧美午夜片在线看| 色视频欧美一区二区三区| 成人性生交大片| 国产福利91精品一区二区三区| 经典三级在线一区| 极品尤物av久久免费看| 免费成人在线观看视频| 美女视频一区二区| 精品一区二区三区在线观看国产 | 日韩av网站免费在线| 亚洲电影第三页| 日韩 欧美一区二区三区| 日韩高清在线不卡| 免费av成人在线| 精品亚洲成a人| 国产精品一区久久久久| 国产精品影视天天线| 国产成人免费9x9x人网站视频| 国产99久久久精品| av电影在线不卡| 日本二三区不卡| 欧美人与性动xxxx| 精品少妇一区二区三区在线播放 | 国产老妇另类xxxxx| 国产精品18久久久久久vr| 国产经典欧美精品| 99久久99久久精品免费观看 | 国产麻豆午夜三级精品| 国产91精品久久久久久久网曝门| 成人性生交大片| 欧美最新大片在线看 | 成人福利电影精品一区二区在线观看 | 91精品国产麻豆| 日韩欧美国产精品一区| 国产欧美日韩在线| 亚洲一区在线电影| 激情欧美一区二区三区在线观看| 国产精品18久久久| 欧美日韩午夜在线视频| 亚洲精品在线一区二区| 自拍av一区二区三区| 日本亚洲电影天堂| 成人污视频在线观看| 在线观看国产日韩| 精品精品国产高清一毛片一天堂| 国产精品二三区| 首页国产欧美日韩丝袜| 成人黄色小视频在线观看| 3751色影院一区二区三区| 国产精品狼人久久影院观看方式| 亚洲mv在线观看| 成人免费观看视频| 欧美一级片在线观看| 亚洲伦理在线免费看| 精品一区二区在线看| 欧美日韩五月天| 成人免费在线播放视频|