Calculating lineFragment for NSTextContainer
Calculating lineFragment for NSTextContainer
- Subject: Calculating lineFragment for NSTextContainer
- From: Alexander Reichstadt <email@hidden>
- Date: Tue, 19 Jun 2012 11:02:32 +0200
Hi,
for the
- (NSRect)lineFragmentRectForProposedRect:(NSRect)proposedRect sweepDirection:(NSLineSweepDirection)sweepDirection movementDirection:(NSLineMovementDirection)movementDirection remainingRect:(NSRect *)remainingRect {
call I'd like to calculate the proposedRect in case there are bezierPaths limitations of custom shapes.
So I thought there'd be a way to not only clipRect to shade out a piece of a path, but also a way to get that spare-piece from the NSBezierPath instance. Is there?
I wanted to split up the bounds rect of the path to circumvent with the text into stripes of the height of proposedRect passed into the call, then considering the offset from top, if any, then pick the stripe I need and see what the minimum bounds would be if the bezierpath stripe was an own bezier path on its own. Or is there another way?
Thanks
Alex
_______________________________________________
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