• 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: David Duncan <email@hidden>
  • Date: Mon, 26 Apr 2010 12:29:39 -0700

On Apr 26, 2010, at 12:24 PM, Bill Appleton wrote:

> 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


Try checking the text matrix. Cocoa Text will often use the text matrix to scale rather than setting the font size, so if you do both you get text that is way too big. Since the text matrix isn't saved/restored with the GState, this can often propagate from other text drawing you don't control (such as for other controls).
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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>)

  • Prev by Date: conflict between Core Graphics and NSView graphics
  • Next by Date: Re: conflict between Core Graphics and NSView graphics
  • Previous by thread: conflict between Core Graphics and NSView graphics
  • Next by thread: Re: conflict between Core Graphics and NSView graphics
  • Index(es):
    • Date
    • Thread