Re: Display Raster Data?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I should point out that the draw_func may be called by Gtk whenever it needs,
The best is to have the timer callback change the "current" bitmap and call gtk_widget_queue_draw_area().
Then on the drawing callback of the drawing area you just paint the "current" bitmap.




2018-08-01 15:44 GMT+02:00 Luca Bacci <luca.bacci982@xxxxxxxxx>:
I suggest you use GStreamer, you can build a video by pushing bitmap frames and it does everything else for you.

Otherwise, you can animate a DrawingArea. Set up a 60hz timer on your own. The timer callback simply calls
gtk_widget_queue_draw_area(). Then, on the draw_func of your drawingarea you display the bitmaps, one after another.
That's the simplest solution but can have lower timing quality

Luca


2018-08-01 14:18 GMT+02:00 R0b0t1 via gtk-list <gtk-list@xxxxxxxxx>:
On Wed, Aug 1, 2018 at 3:45 AM, Paul Davis <paul@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> 60Hz is a reasonable common refresh rate, but it's not universal, and you
> probably should not rely on it being the context in which your program runs.
>

... I'm not, the update is driven by frame decoding elsewhere. I
pointed it out because doing it at ~60Hz is going to be harder than
say 30Hz or 25Hz and can dictate what is most proper.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux