• 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: Pie shapes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pie shapes


  • Subject: Re: Pie shapes
  • From: R T <email@hidden>
  • Date: Thu, 19 May 2005 10:06:03 -0700 (PDT)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

The answer to the Piece-of-Pie shape is  ...
moveToPoint:aPt... which locates/anchors the path.
Then to be able to draw in different colors, I need
...removeAllPoints and  ... moveToPoint:aPt  at the
end of each loop to avoid getting all the Pie shapes
in the color that was defined last in the loop.

        float st = 1,  num = 0, rr, gg, bb, y = 200,
ct = 0;
        NSPoint aPt = {223, 223};
        NSBezierPath *bp = [NSBezierPath bezierPath];

        [bp moveToPoint:aPt];
        do{
                rr = num/255;  gg = num/255;  bb =
num/255;
                [[NSColor colorWithCalibratedRed:rr
green:gg blue:bb
alpha:1.0] set];
                [bp
appendBezierPathWithArcWithCenter:aPt radius:y
startAngle:108 endAngle:114];
                [bp closePath];
                [bp fill];      [bp removeAllPoints];
 [bp
moveToPoint:aPt];

                st++;   y -= 10;        ct += 16;
        }while(ct<256);


...here's to all us newbies whose questions don't
always raise the interest of this brain trust.

Thanks
Rick T.


> On 5/18/05 8:37 AM, "R T" <email@hidden>
> wrote:
>
> > I've been trying to create a circle, cut into
> > pieces-of-pie shapes with
> > appendBezierPathWithArcWithCenter. I'm having no
> luck.
> > The "radius" length seems to have no effect, the
> > "center" doesnt locate properly and changing
> "angles"
> > causes the center to migrate.
> >
> > Any thoughts or does anyone know of a small piece
> of
> > code that will place a couple pieces of pie at a
> > common center?
> >
> > Thanks
> > Rick T



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

 _______________________________________________
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

  • Follow-Ups:
    • Re: Pie shapes
      • From: Henry McGilton <email@hidden>
  • Prev by Date: Re: Alias Record, new methods?
  • Next by Date: Strange crashing bug
  • Previous by thread: Pie shapes
  • Next by thread: Re: Pie shapes
  • Index(es):
    • Date
    • Thread