Re: Business as usual: Flipped context causing grief
Re: Business as usual: Flipped context causing grief
- Subject: Re: Business as usual: Flipped context causing grief
- From: Keary Suska <email@hidden>
- Date: Mon, 12 Dec 2011 18:19:23 -0700
On Dec 12, 2011, at 6:07 PM, Graham Cox wrote:
>
> On 13/12/2011, at 12:00 PM, Keary Suska wrote:
>
>> IIRC, NSLayoutManager expects that the view it is drawing in is flipped
>
> It expects the CONTEXT it is drawing into is flipped, and in order to do that it asks the CONTEXT the value of -isFlipped.
>
> If the context is associated with a view, the view is queried.
>
> I don't have a view, I have a context. I create the context from a bitmap rep (I'm rendering text, and other things, into an offscreen image). When you do that, it assumes that the context/bitmap is not flipped, and -isFlipped returns NO. There is no way I can see to return YES from isFlipped, or pass setFlipped:YES to the context, or set the flippedness to YES when the context is created.
>
> That is the problem I have.
Sorry I missed the specific approach. The docs say for NSGraphicsContext -isFlipped:
"The state is determined by sending isFlipped to the receiver’s view that has focus. If no view has focus, returns NO unless the receiver is instantiated usinggraphicsContextWithGraphicsPort:flipped: specifying YES as the flipped parameter."
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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