Select a NSBezierPath
Select a NSBezierPath
- Subject: Select a NSBezierPath
- From: Lorenzo <email@hidden>
- Date: Mon, 20 Sep 2004 16:28:11 +0200
Hi,
I have 2 NSBezierPath with lines and curves only (not closed) and I try to
select one of them at mouseDown
if([bp1 containsPoint:thePoint]){
selected = 1;
}
else if([bp2 containsPoint:thePoint]){
selected = 2;
}
but even if I don't click on the lines, the API "containsPoint" returns YES.
And this is wrong.
This happens because I click in a zone which, I presume, if the path was
closed/filled, should appear coloured.
But I click on an empty zone, and the path is not closed, so, since I don't
click on the lines of the path I should not select it.
This sometimes causes I select the path1 instead of the path2, which really
is the path I clicked on. Thus this is wrong.
- Q1: How to fix this?
- Q2: How to get the coordinates x and y of "any" point of the path?
As I wrote here earlier, I am trying to build a Sound-Volume/Time
control such a way I can set different volume levels in different
time-points of the song. It's something like the Sound-Volume control
in iMovie.
- Q3: Am I on the right way?
- Q4: If not, how to create such a control?
Best Regards
--
Lorenzo
email: 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