• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Code and Decode a CGContextRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Code and Decode a CGContextRef
      • From: "Jason Barker" <email@hidden>
References: 
 >Code and Decode a CGContextRef (From: "Jason Barker" <email@hidden>)

  • Prev by Date: Re: Force redisplay of NSTextField after NSFormatter subclass change
  • Next by Date: Re: Setting the bundle bit [Was: Re: UTI's and document packages]
  • Previous by thread: Code and Decode a CGContextRef
  • Next by thread: Re: Code and Decode a CGContextRef
  • Index(es):
    • Date
    • Thread