• 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
Calculating lineFragment for NSTextContainer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Calculating lineFragment for NSTextContainer
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: nspopbutton short title possible?
  • Next by Date: Re: nstableview reload with animation possible?
  • Previous by thread: Re: nspopbutton short title possible?
  • Next by thread: Re: Calculating lineFragment for NSTextContainer
  • Index(es):
    • Date
    • Thread