[Lazarus] TAChart with transparent background
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 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus