Re: Wedgies anyone ?
Re: Wedgies anyone ?
- Subject: Re: Wedgies anyone ?
- From: Robert Miller <email@hidden>
- Date: Mon, 17 Jun 2002 08:24:00 -0400
Hi,
Thanks for taking the time to look at this but, what you were
looking at was my last iteration
of trying to figure out what's going on. As you suggested I started with
cos(x) sin(y) but that only
produces one single line from the center to the perimeter (startPt) as
well. It's as if the arc is not being drawn or begin drawn
in an unexpected location. The odd thing is the if I do:
[path moveToPoint:pieCenter];
[path lineToPoint:startPt];
//[path appendBezierPathWithArcFromPoint:startPt
toPoint:endPt radius:pieRadius];
[path moveToPoint:pieCenter];
[path lineToPoint:endPt];
I get two lines from the center to the perimeter at the correct end
points .! That's the mystery, I'm guessing that
there is something I don't understand about how
'appendBezierPathWithArcFromPoint' works. ???
Regards,
Bob M.
On Sunday, June 16, 2002, at 11:51 AM, Thomas Deniau wrote:
Le 16/06/02 17:34, Robert Miller disait :
startPt = NSMakePoint(pieCenter.x + pieRadius * sin(startAngle),
pieCenter.y + pieRadius * cos(startAngle));
endPt = NSMakePoint(pieCenter.x + pieRadius * sin(endAngle),
pieCenter.y + pieRadius * cos(endAngle));
Erm, maybe I'm totally wrong, but I think that sin gives the 'y'
coordinate.
So IMHO you should do
startPt = NSMakePoint(pieCenter.x + pieRadius * cos(startAngle),
pieCenter.y + pieRadius * sin(startAngle));
endPt = NSMakePoint(pieCenter.x + pieRadius * cos(endAngle),
pieCenter.y + pieRadius * sin(endAngle));
Then I would delete the following lines and directly do
path = [NSBezierPath bezierPath];
[path moveToPoint:pieCenter];
[path lineToPoint:startPt];
[path appendBezierPathWithArcFromPoint:startPt toPoint:endPt
radius:pieRadius];
[path lineToPoint:pieCenter];
But maybe that's not you want to do.
--
Thomas Deniau
_______________________________________________
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.