Hello,<br>I need to layer several images one on top of the others, so I'm using background image and the others on top of it are with transparency. But when I need to change the pictures they are flicker, and it is noticeable that pictures are redrawn.<br>
The sequence that i'm using is:<br>1. First I"m loading all images from disk using cairo_image_surface_create_from_png <br>2. Then i'm layering them:<br>cr = gdk_cairo_create (widget->window);<br>  cairo_translate(cr, PIC1_X_ORIGIN, PIC1_Y_ORIGIN); // Background image<br>
  cairo_set_source_surface(cr, pic1_p, 0, 0);<br>  cairo_paint(cr);<br><br>  cairo_translate(cr, PIC2_X_ORIGIN, PIC2_Y_ORIGIN); //Some graphics and the rest is transparent<br>
  cairo_set_source_surface(cr, pic2_p, 0, 0);<br>
  cairo_paint(cr);<br>
....<br> <br>I assume that in most of the cases the time between drawing the pic1 and then pic2 on top of it is more than 30ms so the second image flickers. <br><br>Is there a way to paint both images at once so the flicker is avoided? Or maybe combine them in background and then paint at once?<br>
<br>Best regards,<br>Blagoj<br>