質問

please tell me how should I add circular process using NSBezierPath . I know the method appendBezierPathWithArcWithCenter but how it works. thanks in advance

役に立ちましたか?

解決

NSBezierPath * path = [NSBezierPath bezierPath];
[path setLineWidth:2];

NSPoint center = { 250,250 };

[path moveToPoint: center];
[path appendBezierPathWithArcWithCenter: center
                                 radius: 64
                             startAngle: 0
                               endAngle: 321];

[[NSColor whiteColor] set];
[path fill];

[[NSColor grayColor] set]; 
[path stroke];  

Have a look at cocoadevcentral

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top