• 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: How to detect a Retina Mac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect a Retina Mac


  • Subject: Re: How to detect a Retina Mac
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Mon, 19 Aug 2013 17:56:19 +0700

On 19 Aug 2013, at 17:35, Graham Cox <email@hidden> wrote:

>
> On 19/08/2013, at 12:05 PM, Gerriet M. Denkmann <email@hidden> wrote:
>
>> Here is the final code (if there is anything wrong or not quite right, please feel free to critizise it):
>
>> 	[NSGraphicsContext setCurrentContext: bitmapContext2 ];
>
>
> You might want to save and restore the current graphics context around the whole thing so that you don't leave it set to your bitmap. It may well be harmless, but always better to play nice.

Good idea. I added:

		NSGraphicsContext *originalContext = [NSGraphicsContext currentContext];
... do stuff ...
		[NSGraphicsContext setCurrentContext: originalContext ];

I had indeed some (non-reproducible) error messages, which may very well be the result of this omission:
[...]: _initWithWindowNumber: error creating graphics ctxt object for ctxt:0x30917, window:0xffffffff


Thanks a lot for pointing this out!

Kind regards,

Gerriet.


_______________________________________________

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: How to detect a Retina Mac
      • From: Graham Cox <email@hidden>
References: 
 >How to detect a Retina Mac (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to detect a Retina Mac (From: Tom Davie <email@hidden>)
 >Re: How to detect a Retina Mac (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to detect a Retina Mac (From: Tom Davie <email@hidden>)
 >Re: How to detect a Retina Mac (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to detect a Retina Mac (From: Marcel Weiher <email@hidden>)
 >Re: How to detect a Retina Mac (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to detect a Retina Mac (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to detect a Retina Mac (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: How to detect a Retina Mac
  • Next by Date: Re: How to detect a Retina Mac
  • Previous by thread: Re: How to detect a Retina Mac
  • Next by thread: Re: How to detect a Retina Mac
  • Index(es):
    • Date
    • Thread