[cairo] cairo_get_target() and groups

Uli Schlachter psychon at znc.in
Sun Jul 10 00:36:18 PDT 2011

On 10.07.2011 00:43, Krzysztof Kosiński wrote:
> When a group is pushed onto a context using cairo_push_group(),
> cairo_get_target() will return the base surface rather than the
> temporary surface used by the group. Is this by design? It looks like
> a bug to me.


yes, that's by design. What you want is done by cairo_get_group_target():

I don't know anything about the reasoning for this, but internally
cairo_get_target() is handled by _cairo_gstate_get_original_target() while
cairo_get_group_target() calls _cairo_gstate_get_target().
(Internal) confusion ensured.

Also, does anyone know how the order in the API docs is generated? It's not
alphabetically and everywhere in the source I looked, cairo_get_group_target()
comes right after cairo_get_target(). Just not in the docs.

- He made himself, me nothing, you nothing out of the dust
- Er machte sich mir nichts, dir nichts aus dem Staub

More information about the cairo mailing list