Re: how to draw a elliptical pie chart?
Re: how to draw a elliptical pie chart?
- Subject: Re: how to draw a elliptical pie chart?
- From: Jonathan Hull <email@hidden>
- Date: Thu, 06 Jun 2013 03:30:08 -0700
If you are using a CGPath, then you will need to add the path to the CGContext and then fill the context. You would most likely want to save/restore the context around this as well.
CGContextAddPath(context, path);
CGContextSetFillColorWithColor(context, color);
CGContextFillPath(context);
If you are using NSBezierPath, then it is a bit easier:
[color set];
[path fill];
Note: This code was written off the top of my head in mail.
Thanks,
Jon
On Jun 6, 2013, at 1:44 AM, Nick Rogers <email@hidden> wrote:
> Hi,
>
> I'm new to core graphics.
> The target oval (target oval.jpg) and current oval (oval.jpg) are available at http://www5.snapfish.in/snapfishin/thumbnailshare/AlbumID=9188624025/a=11429776025_11429776025/otsc=SHR/otsi=SALBlink/ .
> In oval after drawing the top filled ellipse I'm creating a path that moves from a point on the ellipse to its centre and then back to another point on the ellipse thus forming a slice.
> The problem is how to fill this elliptical slice with a different colour.
>
> Please help.
> Nick
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden