문제

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