Lazarus

Programming => Graphics => Graphics and Multimedia => BGRABitmap and LazPaint => Topic started by: Rails on May 23, 2012, 07:33:45 pm

Title: Updating Only The Changed Part Of A Bitmap
Post by: Rails on May 23, 2012, 07:33:45 pm
Is there any way to repaint only part of a bitmap? I am using BGRAVirtualScreen.Bitmap.PutImage to update the virtual screen, then calling repaint. I would like to somehow mask the process so that only the changed part of the source bitmap is redrawn on the virtual screen. The idea is to speed up the redraw process, hopefully substantially. Can this be done?

Thanks.

Title: Re: Updating Only The Changed Part Of A Bitmap
Post by: circular on May 24, 2012, 03:12:48 pm
In order to redraw only a part with the PutImage, you can use ClipRect property.

In order to update only a part of the virtual screen to the form, you can use InvalidateRect or something like that.
Title: Re: Updating Only The Changed Part Of A Bitmap
Post by: Rails on May 24, 2012, 03:17:07 pm
Thanks Circular. I'll give it a try.


TinyPortal © 2005-2018