Re: Cached text output is flippin' flipped!
Re: Cached text output is flippin' flipped!
- Subject: Re: Cached text output is flippin' flipped!
- From: Graham Cox <email@hidden>
- Date: Tue, 6 May 2008 11:21:21 +1000
On 6 May 2008, at 11:09 am, Aki Inoue wrote:
NSLayoutManager expects that the coordinate system its rendering
into to be flipped and the current graphics context's -isFlipped to
return YES.
I thought that was the case.
How are you rendering into these contexts ?
The contexts are created in two ways, depending on the kind of cache I
use (though both have the same result). In the case of a CGLayer, I
use CGLayerCreateWithContext based on the current context (the flipped
view), then use the returned layer context to make an
NSGraphicsContext. At that point I set flipped to NO. Reason? because
if I set it to YES ALL of my other content comes out flipped (because
the original view is flipped, two flips would be wrong). If there were
a way to set it flipped *after* rendering the content that might do
it, but there is no setFlipped: method on NSGraphicsContext, I only
get one opportunity to set it, and that's right up front before I can
render into it.
Thanks for any insight.
G.
_______________________________________________
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