How can i strore all pixel point in the CGContextAddArc To NSMutableArray.or CGContextRef to NSMutable Array
static inline float radians(double degrees)
{
return degrees * PI / 180;
}
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGRect parentViewBounds = self.bounds;
CGFloat x = CGRectGetWidth(parentViewBounds)/2;
CGFloat y = CGRectGetHeight(parentViewBounds)/2;
UIColor *rbg=[UIColor redColor];
CGContextSetFillColor(context, CGColorGetComponents( [rbg CGColor]));
CGContextMoveToPoint(context, x, y);
CGContextAddArc(context, x, y,100,radians(35),radians(105),0);
CGContextClosePath(context);
CGContextFillPath(context);
// here I want to store All points Containing in the Arc to NSMutableArray
NSMutableArray *pointsArray=????
}
IMAGE