Re: CGContextShowTextAtPoint
Re: CGContextShowTextAtPoint
- Subject: Re: CGContextShowTextAtPoint
- From: Conrad Shultz <email@hidden>
- Date: Wed, 14 Oct 2015 11:56:56 -0700
> On Oct 14, 2015, at 11:41 AM, Raglan T. Tiger <email@hidden> wrote:
>
>
>
>> On Oct 14, 2015, at 10:02 AM, Jens Alfke <email@hidden> wrote:
>>
>> The view is probably using flipped coordinates. Look up flipped coordinates in the Cocoa view documentation to understand what they are and how to work around the problem.
>>
>> As for the size, have you set the size of the NSFont in ‘sysFont’?
>>
>
> I am using -graphicsContextWithBitmapImageRep and then adding text annotations. The reason for using CGContextShowTextAtPoint in the first place was to solve this problem when drawing NSStrings.
>
> I guess the real question is "How to you draw NSStrings as flipped == YES when the current NSGraphicsContext is graphicsContextWithBitmapImageRep which is flipped = NO.
If I understand your question, I’d expect you could set the graphics context’s transform (see the CGContextFooCTM() family of functions), draw your text, then reset the transform.
-Conrad
_______________________________________________
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