[Lazarus] TPicture beginupdate or similar

Benito van der Zander benito at benibela.de
Fri Nov 26 23:54:32 CET 2010


>
> Hi again, I'm doing some transformations on a TImage using
> Canvas.CopyRect
>    

For changing pictures a TPaintBox is better
> I need to do something similar to TListView's Items.BeginUpdate - Items.EndUpdate.
>    
That doesn't exist for images, only temporary images and the 
doublebuffered property.
> When the user moves the mouse
> again, before doing anithing, I paint the original area with the
> temporary bitmap to obtain the original image, then re-draw on the new
> area. This causes flickering, and I thing it can be avoided using
> something like BeginUpdate at the beginning of my method and EndUpdate
> at the end

Draw the area around new and old mouse position in an temporary image, and
then draw the original image as well as the redrawing on that temporary image, and
this temporary image on the visible control.
Then only one drawing changes the visible image and it can't flicker.

Benito





More information about the Lazarus mailing list