Re: conflict between Core Graphics and NSView graphics
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