Re: Code and Decode a CGContextRef
Re: Code and Decode a CGContextRef
- Subject: Re: Code and Decode a CGContextRef
- From: David Duncan <email@hidden>
- Date: Tue, 27 Nov 2007 10:59:21 -0800
On Nov 27, 2007, at 5:17 AM, Jason Barker wrote:
I have an object with a member variable that is a CGContextRef. I'm
trying to implement the NSCoding protocol in my object. What is the
best/easiest way to code and decode this CGContextRef?
There isn't one easy way to do it, it depends on how you obtained the
context in the first place. A bitmap context you would probably encode
by describing its properties and maybe saving an image from its
current contents. A PDF context may be described by the PDF data
itself or a location where the PDF should be saved to. Other kinds of
contexts are probably best not archived at all.
What kind of context are you working with and where does it come from?
Answering that question will probably tell you what you want to know
to encode it well.
--
David Duncan
Apple DTS Animation and Printing
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden