bee*_*eev 5 bezier core-graphics ios nsbezierpath
我正在尝试在 iOS 中绘制四分之一圆。在 Mac OS 中,您似乎可以使用 appendBezierPathWithArcWithCenter 但这似乎不适用于 iOS。
有谁知道如何在 iOS 中简单地绘制四分之一圆?
谢谢
有两种 iOS 等效项,一种用于UIBezierPath,另一种用于CGPath:
UIBezierPath相等的UIBezierPath *path = [UIBezierPath bezierPath];
[path addArcWithCenter:centerPoint
radius:radius
startAngle:startAngle
endAngle:endAngle
clockwise:YES];
Run Code Online (Sandbox Code Playgroud)
CGPath相等的CGMutablePathRef path = CGPathCreateMutable();
CGPathAddArc(path, NULL,
centerPoint.x, centerPoint.y,
radius,
startAngle,
endAngle,
NO); // clockwise
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
827 次 |
| 最近记录: |