• 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: NSBezierPath hit- or proximity-detection.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath hit- or proximity-detection.


  • Subject: Re: NSBezierPath hit- or proximity-detection.
  • From: David Remahl <email@hidden>
  • Date: Fri, 21 Feb 2003 15:19:07 +0100

http://cocoadev.com/index.pl?HitDetection

/ Rgds, David

The Cocoa docs suggest that "Using methods of NSBezierPath, you can also
perform hit detection on the filled or stroked path."

I draw a simple set of open curves that do not enclose pixels as such, but the
line width is sufficient that a user can easily click on the path.
[NSBezierPath contains:] does not recognize such a click.

Is there any other approach that could? I have used NSReadPixel for a stopgap
solution but this requires each path to be a unique colour.

Other things I'd like to do:
- given a coordinate, get the distance to the closest point on the path
- given a distance on the path, query the coordinate of the drawing pen
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSBezierPath hit- or proximity-detection. (From: email@hidden)

  • Prev by Date: 3 IB Qs: actions; view tags; NSWindow setFrame
  • Next by Date: Re: Obj-C questions: protocol "casting"; random
  • Previous by thread: NSBezierPath hit- or proximity-detection.
  • Next by thread: Obj-C questions: protocol "casting"; random
  • Index(es):
    • Date
    • Thread