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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to