请教各位:在Canvas中画完图后,如何清除?谢谢!急!急!急!在线等... ( 积分: 50 )

  • 主题发起人 主题发起人 tianguozhi
  • 开始时间 开始时间
T

tianguozhi

Unregistered / Unconfirmed
GUEST, unregistred user!
请教各位:在Canvas中画完图后,如何清除?谢谢!急!急!急!在线等...
 
请教各位:在Canvas中画完图后,如何清除?谢谢!急!急!急!在线等...
 
使用canvas.floodfill 可以使起到清除画布的作用
具体用法可以参看 delphi 的帮助
 
Canvas.FillRect(Rect(0,0,aWidth,aHeight));
 
如果有对该矩形记录的话,当然是使用pen.mode
否则的话,直接fillrect把画布清空
不过记住每次对于pen,brush的改变都要恢复,免得麻烦
Canvas.FillRect(Canvas.ClipRect)
 
当然了这样也是可以的
Image.Picture := NIL
 
各位大虾,以上几种方法好像都不行啊?
 
Fills the specified rectangle on the canvas using the current brush.

Delphi syntax:

procedure FillRect(const Rect: TRect);

C++ syntax:

void __fastcall FillRect(const TRect &Rect);

Description

Use FillRect to fill a rectangular region using the current brush. The region is filled including the top and left sides of the rectangle, but excluding the bottom and right edges.
 
记住原来的控件的颜色,当你想清除绘画的内容后用原来的颜色重新绘一次就可以了。[:D]不用谢了
 
楼上幽默[:D][:D]
 
后退
顶部