Re: text orientation/positioning with layout manager
Re: text orientation/positioning with layout manager
- Subject: Re: text orientation/positioning with layout manager
- From: Todd Heberlein <email@hidden>
- Date: Wed, 02 Feb 2011 14:40:09 -0800
Thanks everyone! I've learned a lot. I also found working in a flipped view easier for just getting a grasp of things like the NSRect returned by -usedRectForTextContainer:.
Just for fun, I played with an NSView that is flipped, *except* just before the call to -drawGlyphsForGlyphRange:atPoint: (which appears to call -isFlipped), then I get upside down text. Silly, I know, but part of the fun of learning how things work.
Todd
- (id)initWithFrame:(NSRect)frame
{
...
is_flipped = YES;
...
}
- (BOOL)isFlipped
{
return is_flipped;
}
- (void)drawRect:(NSRect)dirtyRect
{
...
is_flipped = NO;
[layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:p0];
is_flipped = YES;
...
}
_______________________________________________
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