FROM : David Duncan
DATE : Tue Nov 27 19:59:21 2007
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
david.<email_removed>
DATE : Tue Nov 27 19:59:21 2007
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
david.<email_removed>
| Related mails | Author | Date |
|---|---|---|
| Jason Barker | Nov 27, 14:17 | |
| David Duncan | Nov 27, 19:59 | |
| Jason Barker | Nov 28, 06:57 | |
| Alastair Houghton | Nov 28, 11:43 | |
| Jason Barker | Nov 28, 17:57 | |
| Alastair Houghton | Nov 28, 18:12 | |
| Jean-Daniel Dupas | Nov 28, 18:19 |






Cocoa mail archive

