On 19/08/2013, at 9:01 AM, Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote:

> I seem to need a way to tell NSImage NOT to double the pixels for me, but I 
> don't see any way to do this.
> Like: [ image setBackingScaleFactor: 1 ] but no such method seems to exist.
> 
> 
> So hardcoding the retina-ness of my current computer seems to be the only 
> solution.


Of course it isn't.

Marcel's answer looks correct to me - forget NSImage, use NSBitmapImageRep 
instead (without adding it to an NSImage). Instead of -lockFocus, etc, just 
create a context using the bitmap rep and set it as the current context. Then 
you can draw using either high-level stuff that uses "the current context" or 
lower level CG... functions.

The problem you're running into is that NSImage is trying to be too darn smart. 
Don't give it the chance, by not using it AT ALL.

--Graham




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to