[Lazarus] Fast drawing to canvas

Sven Barth pascaldragon at googlemail.com
Fri Feb 10 11:43:06 CET 2012


Am 10.02.2012 11:32, schrieb Felipe Monteiro de Carvalho:
> On Fri, Feb 10, 2012 at 11:13 AM, Sven Barth
> <pascaldragon at googlemail.com>  wrote:
>> But why does the canvas of a TGraphic descendant (TBitmap,
>> TPortableNetworkGraphic, etc.) need to store the data on the X-Server?
>> Wouldn't it be enough to transport that only when it's displayed?
>
> But then it would not a Gtk native bitmap and would not be a native X
> image. Remember, existing widgetsets try to be as native as possible
> and TBitmap has a Handle property to access the native Handle.

Right...

> In LCL-CustomDrawn I went on the opposite direction. There
> TCanvas.Pixels[] is just a front end to TLazIntfImage.Colors[] so
> Pixels[] is fast and executes no X11 operations. On each OnPaint event
> only 1 single X11 operation is executed: upload the final form image.
> But of course it still has a huge way to go before getting usable in
> desktop applications.
>

Hmm... maybe I should try that with LCL-CustomDrawn ^^

Do the following components work already?

* TPaintBox
* TOpenGLContext
* TImage
* TCustomControl (and descendants)

Regards,
Sven




More information about the Lazarus mailing list