Re: A Question about Bezier Paths..
Re: A Question about Bezier Paths..
- Subject: Re: A Question about Bezier Paths..
- From: Shawn Erickson <email@hidden>
- Date: Fri, 1 Apr 2005 13:47:47 -0800
What about this? (written in mail)
You could of course you a transform if you wanted as well. Also
consider NSRectFrame, NSRectFill, and NSRectFillList.
- (void) drawRect:(NSRect) rects
{
[super drawRect:rects];
NSRect aRect = NSMakeRect(0.0, 0.0, 50.0, 50.0);
NSBezierPath *mainPath = [NSBezierPath bezierPath];
[[NSColor greenColor] set];
[mainPath appendBezierPathWithOvalInRect:aRect];
NSRect aSmallCtrlPoint;
aSmallCtrlPoint.size = NSMakeSize(10.0, 10.0);
aSmallCtrlPoint.origin = NSMakePoint(NSMinX(aRect), NSMinY(aRect));
[mainPath appendBezierPathWithRect:aSmallCtrlPoint];
aSmallCtrlPoint.origin = NSMakePoint(NSMaxX(aRect), NSMinY(aRect));
[mainPath appendBezierPathWithRect:aSmallCtrlPoint];
aSmallCtrlPoint.origin = NSMakePoint(NSMinX(aRect), NSMaxY(aRect));
[mainPath appendBezierPathWithRect:aSmallCtrlPoint];
[aSmallCtrlPoint.origin = NSMakePoint(NSMaxX(aRect), NSMaxY(aRect));
[mainPath appendBezierPathWithRect:aSmallCtrlPoint];
[mainPath stroke];
}
_______________________________________________
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