zwz_good  

2009年4月26日

摘要: program Clover; //程序5-8 Clover uses Windows, Messages, Math; function WndProc(hWindow: HWND; Msg, wParam, lParam: LongInt): LRESULT; stdcall; const {$J+} hRgnClip: HRGN = 0; cxClient: Integer = ... 阅读全文
posted @ 2009-04-26 16:48 zwz_good 阅读(160) 评论(0) 推荐(0) 编辑
 
摘要: program RandRect; //程序5-7 RandRect uses Windows, Messages; var cxClient, cyClient: LongWord; procedure DrawRectangle(hWindow: HWND); var hWndc: HDC; hBrush1: HBRUSH; rc: TRect; begin if (0... 阅读全文
posted @ 2009-04-26 15:43 zwz_good 阅读(141) 评论(0) 推荐(0) 编辑
 
摘要: program WhatSize; //程序5-6 WhatSizeze uses Windows, Messages; procedure Show(hWindow: HWND; hWndc: HDC; xText, yText, iMapMode: integer; szMapMode: PChar); var szBuffer: array[0..5... 阅读全文
posted @ 2009-04-26 15:05 zwz_good 阅读(192) 评论(0) 推荐(0) 编辑
 
摘要: 原作者姓名 汪自军 介绍 Windows绘图映射模式有8种,涉及到逻辑坐标系,设备坐标系,窗口坐标,视口坐标等概念,本文就是作者学习研究之后的一点心得,和大家分享。 读者评分 3 评分次数 1 正文 Windows绘图映射模式 窗口和视口 数据显示和图形绘制并不是直接在屏幕上进行的,而是首先将图形绘制到一个具有逻辑坐标系的虚拟窗口中,然后再根据预先设置好的映射模式,将虚拟窗口中的图形或图像... 阅读全文
posted @ 2009-04-26 10:12 zwz_good 阅读(501) 评论(0) 推荐(0) 编辑

2009年4月25日

摘要: program Altwind;//程序5-5 AltWinduses Windows, Messages; function WndProc(hWindow: HWND; Msg, wParam, lParam: LongInt): LRESULT; stdcall;const{$J+} cxClient: Integer = 0; cyClient: Integer = 0; aptF... 阅读全文
posted @ 2009-04-25 16:10 zwz_good 阅读(133) 评论(0) 推荐(0) 编辑
 
摘要: program Bezier; uses Windows, Messages; procedure DrawBezier(hdc1: HDC; apt: array of TPoint);begin PolyBezier(hdc1, apt, 4); //贝塞尔曲线 // 绘制控制点与端点连线 MoveToEx(hdc1, apt[0].X, apt[0].Y, nil); ... 阅读全文
posted @ 2009-04-25 15:42 zwz_good 阅读(138) 评论(0) 推荐(0) 编辑
 
摘要: program LineDemo; uses Windows, Messages; function WndProc(hWindow: HWND; msg, wParam, lParam: LongInt): LRESULT; stdcall;const{$J+} cxClient: Integer = 0; cyClient: Integer = 0;{$J-}var ps: TPain... 阅读全文
posted @ 2009-04-25 13:13 zwz_good 阅读(133) 评论(0) 推荐(0) 编辑
 
摘要: program Sinewave; uses Windows, Messages, Math;const NUM = 1000; function WndProc(hWindow: HWND; msg, wParam, lParam: LongInt): LRESULT; stdcall;const TWOPI = (2 * 3.1415926);{$J+} cxClient: int... 阅读全文
posted @ 2009-04-25 12:40 zwz_good 阅读(145) 评论(0) 推荐(0) 编辑

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) 编辑