Canvas是Delphi绘图的主要手段,下面系统介绍Canvas的使用和方法
1.具有CANVAS属性的控件
TBitmap,TComboBox,TDBComboBox,TDBGrid,TDBListBox,TDirectoryListBox, TDrawGrid,TFileListBox,TForm,THeaderControl,TImage,TListBox,TOutline, TPaintBox,TPrinter,TStatusBar,TStringGrid等。
2.CANVAS属性及命令
方法
rectangle():画矩形
Rectangle(X1,y1,x2,y2 : Integer);
Rectangle方法在画布上用当前画刷绘制矩形,(x1,y1)是矩形的左上角,(x2,y2)是矩形的右下角
roundrect():画圆角矩形
arc():画弧线(不填充)