GTK + 2D slot machine type animation

I wrote a basic simulation of slot machines using C and GTK under Linux. The slot machine has 5 reels with each reel having 3 symbols. To “spice up” the spinning action, I just use an animated GIF with an array of 3.5 GtkImages.

I would like it to look like a suitable slot machine, where a vertical animation was created for each reel. I would suggest that I would need to create a pixmap or pixbuf from the characters on the reel, use g_timer_add () to change the visible part of pixmap to GtkImage. I am new to Gtk +, so if anyone has a simple example of this type of animation or good documentation, I will be forever grateful.

Thank.

+3
source share
1 answer

GtkDrawingArea GtkImage, , . PNG, . pixbuf, , cairo. , cairo, . g_timer_add, ( ). , . GTimer, , , g_timer_add , GTimer. .

+1
source

All Articles