UIBezierPath简单介绍

这里列出的是经常用到的方法

 

+ (instancetype)bezierPath;

+ (instancetype)bezierPathWithRect:(CGRect)rect;//画矩形

+ (instancetype)bezierPathWithOvalInRect:(CGRect)rect;//画椭圆(圆形是椭圆的一种,可以通过数值设置来画圆)

 

画弧度的方法

- (void)addArcWithCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise NS_AVAILABLE_IOS(4_0);

 

两种贝赛尔曲线

 

- (void)addCurveToPoint:(CGPoint)endPoint controlPoint1:(CGPoint)controlPoint1 controlPoint2:(CGPoint)controlPoint2;

- (void)addQuadCurveToPoint:(CGPoint)endPoint controlPoint:(CGPoint)controlPoint;

 

 

moveToPoint //开始画线(起点)

addLineToPoint//画向下一点(两点之间连线)

closePath//起点和终点连线

注:

stroke 填充线条颜色

fill   填充划线区域内的部分

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值