Re: Tracking rectangles and bezier paths
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