は(良く、ちょっと)溶液です:ここで、ここでいくつかの注意点があること
#define radians(degrees) ((degrees)/180 * M_PI)
void drawWedge(CGContextRef context, CGFloat x, CGFloat y, int deg1, int deg2, CGFloat radius)
{
CGContextMoveToPoint(context, x, y);
CGContextAddArc(context, x, y, radius, radians((double) deg1), radians((double) deg2), YES);
CGContextAddLineToPoint(context, x, y);
CGContextStrokePath(context); // or CGContextFillPath()
}
注、15ピクセルの半径範囲0~90を有する円である:
ご覧のとおり、PacManのような感じです。あなたと私が理解している角度から逆になっているからです。しかし、この機能を使いこなすとうまくいくはずです。