• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A Question about Bezier Paths..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >A Question about Bezier Paths.. (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: U3D File Format
  • Next by Date: Re: This has to be easy...
  • Previous by thread: A Question about Bezier Paths..
  • Next by thread: U3D File Format
  • Index(es):
    • Date
    • Thread