• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: text orientation/positioning with layout manager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: text orientation/positioning with layout manager (From: Aki Inoue <email@hidden>)
 >Re: text orientation/positioning with layout manager (From: "David F." <email@hidden>)
 >Re: text orientation/positioning with layout manager (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: Re: NSDateFormatter misbehaving
  • Next by Date: Re: NSDateFormatter misbehaving
  • Previous by thread: Re: text orientation/positioning with layout manager
  • Next by thread: Sending email with attachments
  • Index(es):
    • Date
    • Thread