[Lazarus] Smooth scrolling label (marquee)

Luca Olivetti luca at wetron.es
Wed Nov 11 01:21:00 CET 2015

El 10/11/15 a les 23:37, Graeme Geldenhuys ha escrit:
> On 2015-11-10 21:09, Luca Olivetti wrote:
>> But in the end I have to render it on the LCL canvas
> Via a single BitBlt which should be more than fast enough for what you
> described. Unless LCL is seriously broken.

I don't know if it's broken, but, AFAIK, there are two ways to animate 

1) with a timer (constrained by the windows resolution)
2) with a thread+synchronize (only the main thread can access the gui, 
and the constraint here is the rate the application loop calls 

But what really puzzles me is the different behavior between xp and 7 
(maybe it's aero, I could try disabling it). The fact that it's a font 
of size 100 with a bitmap below it doesn't help, but it should be possible.

> But as the AggPas demos shows, text animation (more advanced that what
> you described - movement of text on a constantly moving bezier curve) is
> easy and possible with excellent results. So AggPas will not be the
> bottleneck.

See above, the problem lies somewhere else, a simple TextRect is enough 
for what I'm doing. I just used BGRABitmaps to split the background 
image so only the part under the scrolling label has to be redrawn (I 
probably could have done the same with TLazIntfImage), but it didn't help.

Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

More information about the Lazarus mailing list