• 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
NSCustomImageRep and NSImage setSize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSCustomImageRep and NSImage setSize


  • Subject: NSCustomImageRep and NSImage setSize
  • From: Mathew Eis <email@hidden>
  • Date: Tue, 29 Oct 2013 21:14:48 -0700

Hello List,

I am trying to get an NSCustomImageRep to properly “react” (e.g. redraw) after a NSImage setSize call.

I am writing a NSCustomImageRep class for a resolution independent image format (e.g. like NSPDFImageRep and NSEPSImageRep). However, I can’t get it to properly account when the size is adjusted through NSImage setSize. So long as I call setSize before the first time the image is drawn, everything works perfectly, but any subsequent calls to setSize don’t seem to cause my imageRep to redraw for the new size.

A call to NSImage recache doesn’t seem to have any effect, and I am especially confused because the documentation for NSImage setCacheMode states that “NSPDFImageRep and NSEPSImageRep classes use theNSImageCacheAlways mode” How can the image reps be always cached and yet respond appropriately (e.g. maintain full resolution) when NSImage setSize is called?

Thanks in advance!

-Mathew Eis
_______________________________________________

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: NSCustomImageRep and NSImage setSize
      • From: Graham Cox <email@hidden>
  • Prev by Date: Apple Sample Code WWDC 2010 session 114
  • Next by Date: Resolving a file reference from the iTunes plist
  • Previous by thread: Re: NIBs combining NSTabView and NSDrawer
  • Next by thread: Re: NSCustomImageRep and NSImage setSize
  • Index(es):
    • Date
    • Thread