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. R# 2014-09-16 0:07 GMT+02:00 Werner Pamler <werner.pam...@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@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus