Re: [fltk.general] R: Re: Smooth blinking

2013-03-20 Thread Albrecht Schlosser
On 19.03.2013 16:31, memoryl...@tin.it wrote:

 The problem was that, under particular conditions (many redraw of images), my 
 blinking could become irregular,
 as timers, if I understand well, are all at the same priority level.

Hint Fl::repeat_timeout() is designed to compensate for small timer
delays, so that the next timer interval will be shorted if the
actual timer callback is serviced later than it should. However,
this does obviously work only if the overall CPU usage is small
enough so that there is room to *wait* for the next timer. If the
CPU is utilized so heavily that there is no time left, then ...

Also note that this timer delay compensation works well (i.e. as
designed) on Linux, but probably not on Windows :-( I did some
tests a while back, but lost track of it. I can't say anything
about Mac OS WRT this.

 The technique you and Greg told me is clear ; will clean up something in my 
 (growing!) app and try
 to avoid unnecessary redraws.

That's always a good idea.

Albrecht

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] R: Re: Smooth blinking

2013-03-19 Thread memoryl...@tin.it
Hi Greg and Ian,


  Use a timer to blink... but things are not always smooth blinking.
  Not a big problem, anyway... just would like to know if there is a
 clever way to assure a smooth blinking
  (usually we are speaking of small objects).

Not really sure this is what was being asked, but here's a simple demo of 
blinking widgets.

Maybe this is what was wanted?

Yes.
The problem was that, under particular conditions (many redraw of images), my 
blinking could become irregular,
as timers, if I understand well, are all at the same priority level.

The technique you and Greg told me is clear ; will clean up something in my 
(growing!) app and try
to avoid unnecessary redraws.

Again,
thank you a lot for your precious help.

Best regards,
Lucio

 
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk