[Xr] Dealing with groups in Xr

Carl Worth cworth at east.isi.edu
Thu Apr 24 09:23:30 PDT 2003

On Apr 24, Owen Taylor wrote:
 > >  > Just as a thought, perhaps Enter/Leave is better than Push/Pop?
 > >  > Push/Pop seems to indicate tat
 > "... to indicate that there is a stack that is separate from the 
 >  XrSave/XrRestore stack"

Ah, not a separate stack. I think I like Push/Pop since they hint at
the fact that there is an implicit XrSave/XrRestore going on here.

 > But in the end, I don't have a strong feeling between the
 > alternatives I wouldn't put up a big fight against any of Push/Pop,
 > Enter/Leave, Begin/End.

Yes. I tend to go overboard trying to find good names, (a universally
frustrating endeavor).

Somewhat related to the above is the earlier suggestion that Xr should
not include a stack of state objects since the user already has a
stack available in C anyway.

I think the fix for that will parallel what we just went through with
the group handling. Namely:

	Xr must provide enough mechanism for the user to manage
	several independent XrState objects, (so XrClone is needed).

	After that, it probably still makes sense to provide
	convenience functions (XrSave/XrRestore) that use XrClone.

The current situation is broken in that the user can't clone an
XrState object except on the internal stack. That steals flexibility
from the user.

But with XrClone in place, I don't think it's inappropriate to make a
stack available in Xr as a convenience.


Carl Worth                                        
USC Information Sciences Institute                      cworth at isi.edu

More information about the cairo mailing list