NSCustomImageRep and NSImage setSize
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