(6) CopyMode属性 该属性用于设置从其他画布拷贝图像的方式 (7) Handle属性 该属性用来返回画布对象的句柄。 (8) Penpos属性 该属性的类型是 Tpoint型,其功能是用来设置 或返回当前画笔位置所在的点
(6)CopyMode属性 该属性用于设置从其他画布拷贝图像的方式 (7)Handle属性 该属性用来返回画布对象的句柄。 (8)PenPos属性 该属性的类型是Tpoint型,其功能是用来设置 或返回当前画笔位置所在的点
2. TCanvas对象的方法 (1) MoveTo方法 [格式]: procedure Move To(X, Y Integer) (2) Lineto方法 [格式]: procedure Lineto(X, Y Integer); (3)Arc方法 类A格式]: procedure Arc(X1,yx,x,r2,x,r3,x,y4 Integer); (4)E11ipse方法 LRIt]: procedure Ellipse(Xl, Y1, X2, Y2: Integer)
2.TCanvas对象的方法 (1)MoveTo方法 [格式]:procedure MoveTo(X,Y Integer); (2)LineTo方法 [格式]:procedure LineTo(X,Y Integer); (3)Arc方法 [格式]:procedure Arc(Xl,Y1,X2,Y2,X3,Y3,X4,Y4: Integer); (4)Ellipse方法 [格式]:procedure Ellipse(Xl,Y1,X2,Y2:Integer);
(5) Rectangle方法 RIt]: procedure Rectangle(X1, Y1, X2, Y2: Integer) (6) Roundrect方法 [ It]: procedure RoundRect(X1, Y1, X2, Y2, X3, Y3 Integer) (7)Pie方法 [格式]: Procedure piet(Ⅹ1,Y1,X2,Y2,X3,Y3,X4,Y4 Longint) (8)Draw方法 类人格式: procedure Draw(X, YInteger; Graphic: Tgraphi): (9) Copy rect方法 [格式]: procedure Rect(Dest: TRect; Canvas: Tcanvas; Sour ce: TRect)
(5)Rectangle方法 [格式]:procedure Rectangle(X1,Y1,X2,Y2:Integer); (6)RoundRect方法 [ 格 式 ] : procedure RoundRect(X1,Y1,X2,Y2,X3,Y3 : Integer); (7)Pie方法 [ 格 式 ] : Procedure Pie(X1,Y1,X2,Y2,X3,Y3,X4,Y4 : Longint); (8)Draw方法 [格式]:procedure Draw(X,YInteger;Graphic:Tgraphic); (9)CopyRect方法 [格式]: procedureCopyRect(Dest:TRect;Canvas:Tcanvas;Sour ce:TRect);
(10) FillRect方法 [格式]: procedure FillRect(const Rect: TRect); (11) StretchDraw方法 LRrt]: procedure StretchDraw(const Rect: TRect Graphic: GRaphic (12) Textout方法 [格式]: procedure Textout(X,Y: Integer, const Text: String) 13) Polygon方法 类A[格式: Procedure Polygon (point(x1, y1), point(x2, y2), Point(x3, y3 (14) Chord方法 [格式]: Procedure Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4)
(10)FillRect方法 [格式]:procedure FillRect(const Rect:TRect); (11)StretchDraw方法 [格式]:procedure StretchDraw(const Rect:TRect; Graphic:TGraphic); (12)TextOut方法 [格式]:procedure Textout(X,Y:Integer, const Text:String); (13)Polygon方法 [格式]:Procedure Polygon([Point(x1,y1),Point(x2,y2),Point(x3,y3 ),…]); (14)Chord方法 [格式]:Procedure Chord(X1,Y1,X2,Y2,X3,Y3,X4,Y4);
【例12-1】编写一个程序,用来绘制一个椭圆和 几个圆角矩形。程序执行时,单击【画图】按钮,运 行界面如图12-2所示。 For1 口区 画图 图12-2程序运行界面
【例12-1】 编写一个程序,用来绘制一个椭圆和 几个圆角矩形。程序执行时,单击【画图】按钮,运 行界面如图12-2所示。 图12-2 程序运行界面