[cairo] How to clear a surface ?

minh thu noteed at gmail.com
Wed Jul 9 00:02:53 PDT 2008


2008/7/8 Gerdus van Zyl <gerdusvanzyl at gmail.com>:
> Take a look at http://www.cairographics.org/FAQ/#clear_a_surface.
> Basically use cairo_set_operator(ctx,CAIRO_OPERATOR_CLEAR) and then
> cairo_paint.

Oh thanks, sorry for not having spotted this myself.
Thu

> On Tue, Jul 8, 2008 at 10:57 PM, minh thu <noteed at gmail.com> wrote:
>> Hi,
>>
>> I'm new to cairo and this list. I've a little question.
>>
>> I'd like to know how I can clear a surface. The result should not
>> simply be white, black or pink but fully transparent, just as when the
>> surface is initially created.
>>
>> I'd like to do that because I copy the cairo data to an OpenGL texture and want
>> the resulting textured quad be transparent, and because I animate/update
>> the texture.
>>
>> Thank you,
>> Vo Minh Thu
>> _______________________________________________
>> cairo mailing list
>> cairo at cairographics.org
>> http://lists.cairographics.org/mailman/listinfo/cairo
>>
>


More information about the cairo mailing list