张志峰的博客

水滴石川,积少成多。

导航

2011年7月28日

摘要: 在编写过程中如果入到传入的参数是动态数组的话可以这么做type TPoints = array of TPoint;Points: TPoints;SetLength(Points, 3); Points[0].X := 150; Points[0].Y := 150; Points[1].X := 240; Points[1].Y := 50; Points[2].X := 320; Points[2].Y := 200;源码如下:unit UForm_Image8;interfaceuses Windows, Messages, SysUtils, Variants, Classes, G 阅读全文

posted @ 2011-07-28 19:28 ╰★张志峰★╮ 阅读(3814) 评论(0) 推荐(0)

摘要: 1. 画两次不就可以了。。第一次画大的,第二画小的。。procedure TForm1.Button1Click(Sender: TObject); begin with Canvas do begin Rectangle(100,100,300,300); Rectangle(150,150,250,250); Brush.Color := clRed; FillRect(rect(150,150,250,250)); end; end;2.先创建出HRGH的区域,再用CombineRgn获取环带的区域,之后填充: var a, b, c: HRGN; hbr: HBRUSH; begin 阅读全文

posted @ 2011-07-28 17:34 ╰★张志峰★╮ 阅读(570) 评论(2) 推荐(0)