汉字在画布上移动如何清除尾迹?(100分)

  • 主题发起人 主题发起人 znxia
  • 开始时间 开始时间
Z

znxia

Unregistered / Unconfirmed
GUEST, unregistred user!
请问各位专家汉字在画布上移动如何清除尾迹?
 
一是完全重画
或是画之前保存要画的区域
移动后恢复
如此如此:)
 
每次画图时清除背景,或者用底色在原位置上画一次
然后在新位置重画
 
可以先将背景保存为一幅位图,如果想要擦除,只需要以背景色重画位图区域就行了。
异或方式对字不起作用, 只对直线等起作用
 
DoubleBuffered := True;


When DoubleBuffered is false, the windowed control paints itself directly to the window. When DoubleBuffered is true, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive.

When a windowed control is a dock site and has an associated dock manager, it must be double-buffered.

Note: Some controls, such as TRichEdit, can抰 paint themselves into a bitmap. For such controls, DoubleBuffered must be set to false.
 
如果是自己画,DoubleBuffered := True;没有用的。

还是要自己创建一个临时的Bitmap,按htw的方法,先在上面画背景,
再画字,之后再复制到屏幕上。
 
多人接受答案了。
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
926
SUNSTONE的Delphi笔记
S
后退
顶部