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 <roger...@mac.com> 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 (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/jhull%40gbis.com
> 
> This email sent to jh...@gbis.com
> 


_______________________________________________

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