[Cairo] Suggestion for replacing cairo_copy with set_gstate.

Bill Spitzak spitzak at d2.com
Fri Sep 26 10:00:19 PDT 2003


On Friday 26 September 2003 08:01 am, Keith Packard wrote:

> A 'cairo_t' object holds only two things right now -- a stack of
> cairo_gstate_t objects and the library status.  One easy suggestion would
> be to eliminate the stack of gstate objects and make the application
> developer hold the cairo stack itself -- cairo_t then becomes precisely
> cairo_gstate_t.  This exposes two problems:
>
>  1)	applications cannot use the save/restore paradigm without
> 	creating a stack themselves (either with local variables on the C
> 	stack, or an explicit linked list).  This would be an
> 	annoyance, but probably not a sigificant one as libraries exposing
> 	a stack of graphics states to applications would presumably already
> 	have a stacked data structure to hang the cairo_t from.



More information about the cairo mailing list