引用博客://www.greatytc.com/p/6130b51a0b71
1.绘制矩形路径:
+ (instancetype)bezierPathWithRect:(CGRect)rect;
2.绘制椭圆路径
2.1绘制普通椭圆路径
+ (instancetype)bezierPathWithOvalInRect:(CGRect)rect;
2.2绘制原型路径
可以把rect设置成正方形。
3.绘制圆角矩形路径
+ (instancetype)bezierPathWithRoundedRect:(CGRect)rect cornerRadius:(CGFloat)cornerRadius;
4.创建圆弧路径
+ (instancetype)bezierPathWithArcCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise;
//注释:
1.clockwise控制旋转的方向。
5.追加一条直线
- (void)addLineToPoint:(CGPoint)point;
6.追加一个圆弧
- (void)addArcWithCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise NS_AVAILABLE_IOS(4_0);
7.追加一条三次贝塞尔曲线
- (void)addCurveToPoint:(CGPoint)endPoint controlPoint1:(CGPoint)controlPoint1 controlPoint2:(CGPoint)controlPoint2;
8.追加一条二次贝塞尔曲线
- (void)addQuadCurveToPoint:(CGPoint)endPoint controlPoint:(CGPoint)controlPoint;