[cairo] semantics of cairo_copy()

Carl Worth cworth at cworth.org
Tue Jan 18 07:16:01 PST 2005


On Tue, 18 Jan 2005 08:04:20 -0500, Jonathan Brandmeyer wrote:
> The fact that it copies only the most recent state from src to the most
> recent state of dest is the most surprising to me,

Yes. That's a bug in naming. I think replacing cairo_copy with
cairo_current_gstate and cairo_set_gstate should clear this up.

Can anyone see a common use for actually cloning an entire cairo_t
context, including the stack of graphics state objects? I can't
imagine anything.

> followed closely by the graphics state including the target device.

This is another area I want to clean up in the API. Currently, setting
a new target device is a poorly specified operation. Does it reset the
current transformation matrix? Does it reset everything in the
graphics state?

There was a recent proposal to pull the path out of the graphics
state. If we do that, we might also pull the target device out. And at
that point it may make sense to distinct save/restore, (for
everything) and gsave/grestore (for just the graphics state), like
PostScript has.

Finally, I'm about to start a new thread on a new group API which may
eliminate most of the need for set_target anyway.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050118/4675693b/attachment.pgp


More information about the cairo mailing list