[cairo] Proposal: cairo_save_state/cairo_restore_state

Owen Taylor otaylor at redhat.com
Tue Jan 24 18:05:51 PST 2006

On Tue, 2006-01-24 at 20:58 -0500, Behdad Esfahbod wrote:
> On Tue, 24 Jan 2006, Owen Taylor wrote:
> > Maybe it would make sense to come up with a slightly-non-trivial
> > example of where this is useful? I'm not sure I see it yet.
> In the expose handlers I guess.  You can have a few states set
> up, just restore it and draw, then the next one.  That's still
> trivial, I confess...

But is it better than just setting up the graphics parameters
you want when you want to use them?

Using save points probably gives a misplaced illusion that 
something efficient is going on behind the scenes, when it's
really just notational convenience for saving each parameter

Plus, you really want to inherit clip from the caller of 
your expose handler, and I would have guess that save-points
save the clip.


More information about the cairo mailing list