• 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: "Raphael Sebbe" <email@hidden>
  • Date: Fri, 8 Sep 2006 18:44:38 +0200

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:
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


  • Follow-Ups:
    • Re: Tracking rectangles and bezier paths
      • From: Dave Budde <email@hidden>
References: 
 >Tracking rectangles and bezier paths (From: Dave Budde <email@hidden>)

  • Prev by Date: Re: [CodeData] Generic model migration code?
  • Next by Date: Re: Categories to help with organization
  • Previous by thread: Tracking rectangles and bezier paths
  • Next by thread: Re: Tracking rectangles and bezier paths
  • Index(es):
    • Date
    • Thread