The so-called double buffer is to first draw to the memory canvas (such as tbitmap), and then post to the destination.
For example, the following smallProgram:
Procedure tform1.formcreate (Sender: tobject); begin timer1.interval: = 100; color: = clwhite; end; Procedure tform1.timer1timer (Sender: tobject); begin canvas. pen. color: = random ($ ffffff); canvas. moveTo (random (clientwidth), random (clientheight); canvas. lineto (random (clientwidth), random (clientheight); end;
The double buffer drawing can be changed:
VaR bit: tbitmap; Procedure tform1.formcreate (Sender: tobject); begin timer1.interval: = 100; bit: = tbitmap. create; bit. width: = clientwidth; bit. height: = clientheight; end; Procedure tform1.timer1timer (Sender: tobject); begin bit. canvas. pen. color: = random ($ ffffff); bit. canvas. moveTo (random (bit. width), random (bit. height); bit. canvas. lineto (random (bit. width), random (bit. height); self. canvas. draw (0, 0, bit); end; Procedure tform1.formdestroy (Sender: tobject); begin bit. free; end;
What tookiq needs is GDI +, and the truth is the same.