Ber*_*rnd 6 core-graphics uiview ios
在UIView中绘制填充(!)半圆的最佳方法是什么?我玩了CGContextAddArc函数,但它似乎没有提供填充.这是我想画的东西 - 两个填充的半圆圈.

rob*_*off 15
CGContextBeginPath(gc);
CGContextAddArc(gc, 100, 100, 50, -M_PI_2, M_PI_2, 1);
CGContextClosePath(gc); // could be omitted
CGContextSetFillColorWithColor(gc, [UIColor cyanColor].CGColor);
CGContextFillPath(gc);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7775 次 |
| 最近记录: |