[cairo] cairo_surface_show_page

David Trallero ditiem at gmail.com
Thu Dec 18 00:18:25 PST 2008


According to the documentation:

"Emits and clears the current page for backends that support multiple pages."

My question is, what happens with backends that do not support multiple
pages? does It do nothing? If that is the case, I would like to propose to
compose the content to be shown with the "current" image (yes, there is
double buffer somewhere). This is useful to compose two images (they may
have some alpha-values).

(The main idea behind this proposal is the use of PBuffer in OpenGl backend)

An example of use could be:

surface -> clean_background( ) ;

for ( i = 0 : i < num_layers ; i ++ )
{
    // paint a layer
    ....
    // Combine the layer (2nd buffer) with the current image (1st
visual buffer)
    surface -> show_page( ) ;
}

Thanks for you attention,
David


More information about the cairo mailing list