Okay, I see in the doc set that you can perform an NSAffineTransform on an 
NSBezierPath, but how do I perform a rotation of the NSBezierPath about an 
arbitrary CGPoint and with a specified angle in radians? Is this something deep 
in CoreGraphics, or CoreAnimation? If not, I can do the trigonometry myself if 
I can get the list of points that make up the NSBezierPath, but it seems these 
aren't exposed, only NSBezierPathElement objects. Help!
  Also, what is the formula for calculating the area of an arbitrary triangle 
defined by three non-collinear points in 2D space? (i.e. I can't assume the 
triangle even has a 90 degree angle in it, or any other such shortcuts…)
  Finally, If an NSBezierPath consisting of a closed circuit of points:

…
NSBezierPath *mySquarePath = [NSBezierPath bezierPath];

[mySquarePath setLineWidth:1.0];
[mySquarePath moveToPoint:CGPointMake(0.0, 0.0)];
[mySquarePath lineToPoint:CGPointMake(10.0, 0.0)];
[mySquarePath lineToPoint:CGPointMake(10.0, 10.0)];
[mySquarePath lineToPoint:CGPointMake(0.0, 10.0)];
[mySquarePath closePath];
…

will [mySquarePath containsPoint:CGPointMake(5.0, 5.0)] return YES even before 
I fill or stroke the path, or do I have to fill the path first?


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to