[Lazarus] TAChart with transparent background

Roberto P. padovani.r at gmail.com
Tue Sep 16 00:20:33 CEST 2014

The image is a 30KB png, not much.
It is smaller than the area, so it gets actually stretched.
Can I use Draw instead of StretchDraw if I make the image exactly the size
I need?
I can force the form size.

I think that tens of milliseconds can be actually relevant, because I am
plotting data received (and processed) every 50ms from a serial port.


2014-09-16 0:07 GMT+02:00 Werner Pamler <werner.pamler at freenet.de>:

> I added some simple time measuring code (using GetTickCount) to the
> background image tutorial to see the speed loss that you mention: Without
> the backgrounds (Lazarus logo and gradient) the GetTickCount reports 0 ms
> between the OnBeforeDrawBackground and OnAfterPaint events, while with the
> backgrounds it reports 16 ms, sometimes 0 ms. Replacing the StretchDraw by
> a simple Draw in the painting of the logo,  brings down the time also to 0.
> Therefore I'd guess that the background painting is not perceivable unless
> you squeeze a 20 mega-pixel photo into the chart area or load the image
> during the painting event.
> What exactly are you doing?
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140916/1dc8f69d/attachment-0003.html>

More information about the Lazarus mailing list