Re: NSCustomImageRep and NSImage setSize
Re: NSCustomImageRep and NSImage setSize
- Subject: Re: NSCustomImageRep and NSImage setSize
- From: Graham Cox <email@hidden>
- Date: Fri, 08 Nov 2013 17:48:10 +0100
Hi Mathew,
I think you need to set it to NSImageCacheNever. This turns off all of the internal caching mechanism, so your rep, if it’s the only rep in the image, will always be the one to draw. It’ll only be as pixellated as your implementation allows, which should be not at all, right?
—Graham
On 8 Nov 2013, at 4:46 pm, Mathew Eis <email@hidden> wrote:
> Hi Graham,
>
> Thanks for the reply… That’s more or less the crux of the issue; I can’t figure out how to make the rep "resolution independent”.
>
> If I draw it once at, say, 100x100, then I draw it again at 200x200, the second will be pixellated because the NSImage is using a cached (bitmap?) copy of it… If I drew it the first time at 200x200, the cached version has the correct resolution - but it isn’t truly resolution independent because it still seems to be caching a bitmap somewhere.
>
> Regards,
>
> -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