On Feb 15, 2012, at 11:22 AM, William Squires wrote:
> Does this method store the context state in a stack, or just store it in a
> local variable (struct) somewhere (i.e. does calling this more than once
> overwrite the previously saved context info?)
It's a stack. Save pushes, Restore pops.
/* Push a copy of the current graphics state onto the graphics state stack.
Note that the path is not considered part of the graphics state, and is
not saved. */
CG_EXTERN void CGContextSaveGState(CGContextRef c)
CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0);
/* Restore the current graphics state from the one on the top of the
graphics state stack, popping the graphics state stack in the process. */
CG_EXTERN void CGContextRestoreGState(CGContextRef c)
CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0);
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]