[cairo] New API: cairo_{push,pop}_group and friends

Franz Schmid Franz.Schmid at altmuehlnet.de
Sat May 6 04:44:20 PDT 2006


Carl Worth wrote:
> Here is what the new API looks like:
> 
> 	cairo_public void
> 	cairo_push_group (cairo_t *cr);
>  
> 	cairo_public void
> 	cairo_push_group_with_content (cairo_t *cr, cairo_content_t content);
> 
> 	cairo_public cairo_pattern_t *
> 	cairo_pop_group (cairo_t *cr);
> 
> 	cairo_public void
> 	cairo_pop_group_to_source (cairo_t *cr);
> 
> 	cairo_public cairo_surface_t *
> 	cairo_get_group_target (cairo_t *cr);
> 
> There's still some documentation missing, but I'll go ahead and add
> that soon. In the meantime, all of the above has now been pushed out
> to cairo's master branch.
Hi,

i'm Franz Schmid from the Scribus Team, and i've tested the above
mentioned functions in your latest cairo snapshot to achieve layer
transparency in Scribus.

Congratulations it works perfect, saves me about 30 lines of code
and is much faster than my implementation with 2 image surfaces.

So far so good, but in order to be able to get the real transparency
groups as PDF-1.4 provides we need more blendmodes. The existing
Porter and Duff blendmodes are fairly useless if you want to emulate
the PDF-1.4 transparency modes.

It would be very, very fine if you could implement the blendmodes
that are mentioned in the PDF-Reference page 491 and following.

These are: Multiply, Screen, Overlay, Lighten, ColorDodge,
            ColorBurn, HardLight, SoftLight, Difference,
            Exclusion, Hue, Saturation, Color and Luminosity

With these modes in place we could make Scribus getting a bit closer
to the big marketleaders.

Franz Schmid
Scribus-Team


More information about the cairo mailing list