Re: A pie analyzer
Re: A pie analyzer
- Subject: Re: A pie analyzer
- From: Calum Robinson <email@hidden>
- Date: Sat, 19 Apr 2003 21:05:02 +0100
On Saturday, April 19, 2003, at 05:18 pm, Tony S. Wu wrote:
My problem is, NSView only allows me to add tooltip for a rect.
I thought about using NSBezierPath's containsPoint method.
But I am not sure if it's a good idea since i'll be calling this
method for average 5 to 8 times each time a user moves his mouse.
Couldn't you convert the point in your custom view to polar
coordinates? Offset the mouse location to the centre of the pie and
then find the angle & distance from the origin. If the distance is
greater than the radius, the mouse is outside the pie. Then, use the
angle with the values in the pie chart to figure out which 'slice' it's
in.
Calum
_______________________________________________
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.