zwz_good  

2009年4月22日

摘要: Windows的GDI支持两种坐标系,即逻辑坐标系和物理设备坐标系。必须明确逻辑坐标系对应于平时所说的窗口(Window),而设备坐标系才对应视口 (Viewport)。Ondraw中的CDC类所有的绘图方法都是基于逻辑坐标而言的,GDI通过映射模式将逻辑窗口中的图形输出到物理设备上来的。 由逻辑窗口到物理视口的映射过程我们可以这样理解:我们在窗口坐标系(一般是X轴向右递增,Y轴向上递增,即... 阅读全文
posted @ 2009-04-22 16:38 zwz_good 阅读(418) 评论(0) 推荐(0) 编辑
 
摘要: program Devcaps1; uses Windows, Messages, DevcapsConst in 'DevcapsConst.pas'; function WndProc(hWindow: HWND; message, wParam, lParam: LongInt): LRESULT; stdcall;{$J+}const cxChar: Integer = 0; c... 阅读全文
posted @ 2009-04-22 15:55 zwz_good 阅读(205) 评论(0) 推荐(0) 编辑
 
摘要: unit DevcapsConst; interface uses Windows; type TDevcap = record iIndex: integer; szLabel: PAnsiChar; szDesc: PAnsiChar; end; const NUMLINES = 20; var devcaps: array[0..NUMLINES-1] of TD... 阅读全文
posted @ 2009-04-22 15:54 zwz_good 阅读(145) 评论(0) 推荐(0) 编辑