• 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: cocoa-dev digest, Vol 1 #672 - 15 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa-dev digest, Vol 1 #672 - 15 msgs


  • Subject: Re: cocoa-dev digest, Vol 1 #672 - 15 msgs
  • From: Simon Stapleton <email@hidden>
  • Date: Thu, 4 Oct 2001 22:18:38 +0100

Message: 7
Date: Thu, 4 Oct 2001 16:35:19 +0200
Subject: Re: -[NSBezierPath containsPoint:] (again)
From: j o a r <email@hidden>
To: email@hidden

On Thursday, October 4, 2001, at 10:58 , Simon Stapleton wrote:

I was looking for some hit detection stuff for my object modeller
project[1] last night, and I'd kind of misread what 'containsPoint'
should do. I was looking for something that would detect whether a
point was _on_ a path, and it appears that containsPoint detects
points _bounded by_ a path. The docs are a little unclear on this
matter, I think, but I'll let that pass.

I was also looking for a hitPath (or hitCurveSegment really) method,
rather then containsPoint - so I also wrote a method of my own to do
that. Performance is immensly improved over using Apple's method - not
surprisingly, since mine is more specialized.

I share your opinion about the GnuStep method probably being buggy.

Regards,

j o a r

Damn. I just wrote my own (which doesn't deal with curve segments yet, cause I don't need 'em) and posted it onto cocoadev. Could bear some optimisation, but it works. SampleCode, HitDetection for them as what care.

--
PGP Key Id : 0x50D0698D
--
If the answer isn't obvious, the question is a distraction. Go find an easier question.


  • Prev by Date: global default for NSLayoutManager selection threshold?
  • Next by Date: Re: Memory leak tests, NSZombieEnabled=YES and NSTimer
  • Previous by thread: Re: OT filename length
  • Next by thread: Changing app menu name
  • Index(es):
    • Date
    • Thread