• 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: Tracking rectangles and bezier paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tracking rectangles and bezier paths


  • Subject: Re: Tracking rectangles and bezier paths
  • From: Dave Budde <email@hidden>
  • Date: Fri, 8 Sep 2006 10:05:21 -0700

Thanks, That is about what I suspected. I suppose that if the curve is monotonic then it is straightforward to do the math in case 2.

On Sep 8, 2006, at 9:44 AM, Raphael Sebbe wrote:

Hi,

That involves computing an intersection between a region around the
mouse cursor and the curve.

1. If you draw that curve yourself in OpenGL (I mean tesselate it as
segments), this is pretty straightforward, as you set up a pickbuffer
and render the scene a second time only in that region arond the mouse
and see if the curve is inside or not by parsing the pick buffer.

2. If your are using NSBezierPath, well, it seems more difficult to
me, at least it involves parsing the control points and doing about
the same thing as 1 or other fancy math yourself.

Of course, there are workarounds, like landmining the path or just
doing that effect when the mouse enters control point handles.

HTH,

Raphael

On 9/8/06, Dave Budde <email@hidden> wrote:
I've seen at least one application (Space Designer in Logic Pro comes
to mind) that can track a bezier curve and highlight it when a mouse
enters and exits the proximity of the curve.  Is there a similar
thing to tracking rectangle that can do this or does one need to
create a bunch of little rects along the path and assign them the
same proximity variable.

Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Tracking rectangles and bezier paths (From: Dave Budde <email@hidden>)
 >Re: Tracking rectangles and bezier paths (From: "Raphael Sebbe" <email@hidden>)

  • Prev by Date: Re: NSPopupButton
  • Next by Date: Re: trouble with drag and drop, NSTableview, CoreData, Document-based app
  • Previous by thread: Re: Tracking rectangles and bezier paths
  • Next by thread: Re: Re: Tracking rectangles and bezier paths
  • Index(es):
    • Date
    • Thread