• 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: BitMap data format and autorelease
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BitMap data format and autorelease


  • Subject: Re: BitMap data format and autorelease
  • From: Trygve Inda <email@hidden>
  • Date: Fri, 14 Mar 2008 00:44:19 +0000
  • Thread-topic: BitMap data format and autorelease

> I'd use something like this (typed in Mail):
>
> [NSGraphicsContext saveGraphicsState];
> [NSGraphicsContext setCurrentContext:[NSGraphicsContext
> graphicsContextWithBitmapImageRep:imageRep]];
>
> // draw here
>
> [NSGraphicsContext restoreGraphicsState];
>
> which avoids creating an NSImage.

Is this thread-safe? Or is it better to create the NSImage so I can call
lockFocus ?

Thanks,

Trygve


_______________________________________________

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: BitMap data format and autorelease
      • From: "Adam R. Maxwell" <email@hidden>
    • Re: BitMap data format and autorelease
      • From: Jens Alfke <email@hidden>
References: 
 >Re: BitMap data format and autorelease (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: QCView openGLContext
  • Next by Date: get currently logging in users
  • Previous by thread: Re: BitMap data format and autorelease
  • Next by thread: Re: BitMap data format and autorelease
  • Index(es):
    • Date
    • Thread