How do I draw on a GdkPixbuf object without using cairo? There are quite a few samples in gtk 2 that do this by obtaining a Pixmap and draw on it. However, I can seem to find any function that return a Pixmap in gtk 3. For example render_pixmap_and_mask() is no longer available for a Pixbuf object. How do I obtain a pixmap or any drawable from a GdkPixbuf in gtk 3 (similar to gdk_cairo_set_source_pixbuf)?
Asked
Active
Viewed 190 times
0
-
Why do you want to avoid cairo? It seems like cairo is the preferred way to do things. Also, what exactly do you mean with "draw"? Does "fill everything with white" count as drawing or do you want to do some complex antialiased line drawing? – Uli Schlachter Jan 24 '20 at 16:37
-
1The entire point of GTK3 was to use Cairo for all drawing. So you should use Cairo. – TingPing Jan 24 '20 at 23:50
-
I just want to draw a few straight lines. Our system has very limited resources and becomes very sluggish when I tried Cairo (the same cairo code works fine on a regular desktop), so I'm considering manipulate the bitmap manually. Maybe I just get the darn RGB data array and change the pixel values directly. – Chu Bun Jan 28 '20 at 18:23