• 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: Drawing in a NSView out side of drawRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing in a NSView out side of drawRect


  • Subject: Re: Drawing in a NSView out side of drawRect
  • From: "Michael Ash" <email@hidden>
  • Date: Mon, 22 Dec 2008 17:14:39 -0500

On Mon, Dec 22, 2008 at 4:22 PM, David Alter <email@hidden> wrote:
>> >     CGContextRef myContext =
>> > (CGContextRef)[[NSGraphicsContext currentContext]graphicsPort];
>>
>> Right now you're getting the current graphics context, which is purely
>> arbitrary. Nothing has set it yet, so you're getting whatever happened
>> to be hanging around.
>
> Is there a way to create a NSGraphicsContext for the view?

The paragraph immediately following the one you quoted describes how.

Mike
_______________________________________________

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

References: 
 >Drawing in a NSView out side of drawRect (From: "David Alter" <email@hidden>)
 >Re: Drawing in a NSView out side of drawRect (From: "Michael Ash" <email@hidden>)
 >Re: Drawing in a NSView out side of drawRect (From: "David Alter" <email@hidden>)

  • Prev by Date: Replacing objects
  • Next by Date: Re: NSStream APIs
  • Previous by thread: Re: Drawing in a NSView out side of drawRect
  • Next by thread: Re: Drawing in a NSView out side of drawRect
  • Index(es):
    • Date
    • Thread