• 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: conflict between Core Graphics and NSView graphics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conflict between Core Graphics and NSView graphics


  • Subject: Re: conflict between Core Graphics and NSView graphics
  • From: Bill Appleton <email@hidden>
  • Date: Mon, 26 Apr 2010 16:32:38 -0700

that CGContextRef is the same as [[thewind graphicsContext] graphicsPort] in
the scope if the drawRect routine

(i am away from that machine, the code is probably wrong, but you can see
what i mean)

so the two methods return the same context





On Mon, Apr 26, 2010 at 3:58 PM, Mike Abdullah <email@hidden>wrote:

>
> On 26 Apr 2010, at 20:24, Bill Appleton wrote:
>
> > hi all
> >
> > i converted a bunch of quickdraw code to core graphics successfully -- it
> > worked
> >
> > now i am converting a bunch of carbon UI code to cocoa
> >
> > but when I draw text, my fonts are wrong and my  font sizes are much too
> big
> >
> > i am getting the CGContextRef from the NSWindow in the drawRect handler,
> and
> > then setting the CG font and size, etc. like before
>
> Further to the other answers, this part surprises me. I think you want
> [[NSGraphicsContext currentContext] graphicsPort] instead to get to the
> CGContext.
>
> 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: 
 >conflict between Core Graphics and NSView graphics (From: Bill Appleton <email@hidden>)
 >Re: conflict between Core Graphics and NSView graphics (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSDictionaryController)
  • Next by Date: Re: -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSDictionaryController)
  • Previous by thread: Re: conflict between Core Graphics and NSView graphics
  • Next by thread: why doesn't the compiler complain?
  • Index(es):
    • Date
    • Thread