I think the following cairo-operation can help you :)

  /* Clear */
  cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
  cairo_paint(cr);
  cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
……..

Best Regards,
Zhang Wei

________________________________
From: varun shrivastava [mailto:[email protected]]
Sent: 2008年12月30日 13:40
To: clutter
Subject: [clutter] Clutter Cairo Texture

hi
 i tried using clutter cairo texture. What i experienced is, the very first 
time i created a cairo texture using cairo apis
in between clutter_cairo_texture_create and cairo_destroy, i got a perfect 
texture.

Now if i want to redraw something else on the same texture. i am not able to 
clean the texture or the cairo context.
That is i can see both the drawings, the previous one and the new one 
overlapping.

Is there a way to clear the previous texture or how can i reuse the same 
cairo-texture rather than destroying the old one and
creating a new one again.

I tried using cairo_set_source_rgba to clear cairo context, it works for full 
alpha (1.0), but if alpha is 0.0, the problem arises.

By alpha = 0.0 i mean to say, the clutter texture is transparent (i think by 
default clutter-cairo-texture is transparent) of some width and height.
but the cairo drawings are with full opacity.

Thanks and Regards
Varun Shrivastava

Reply via email to