UIBezierPath 贝尔曲线
来源:互联网 发布:券商it收入结构 编辑:程序博客网 时间:2024/04/29 08:04
画实线
@implementation UIView (Drawing)-(CAShapeLayer *)drawLineFromPoint:(CGPoint)p1 toPoint:(CGPoint)p2 width:(CGFloat)width color:(UIColor *)color{ UIBezierPath *path = [UIBezierPath bezierPath]; [path moveToPoint:p1]; [path addLineToPoint:p2]; CAShapeLayer *layer = [CAShapeLayer layer]; layer.lineWidth = width; layer.strokeColor = color.CGColor; layer.path = path.CGPath; [self.layer addSublayer:layer]; return layer;}
画虚线
- (CAShapeLayer*)dashLineFromPoint:(CGPoint)p1 toPoint:(CGPoint)p2 realLinePoint:(CGFloat)realLinePoint dashLinePoint:(CGFloat)dashLinePoint color:(UIColor*)color lineWidth:(CGFloat)lineWidth{ //realLinePoint 单位实线长度 dashLinePoint 单位间隙长度 CAShapeLayer *layer = [self drawLineFromPoint:p1 toPoint:p2 width:lineWidth color:color]; layer.lineDashPattern = @[[NSNumber numberWithInteger:realLinePoint],[NSNumber numberWithInteger:dashLinePoint]]; return layer; }
0 0
- UIBezierPath 贝尔曲线
- UIBezierPath 赛贝尔曲线
- 贝尔曲线
- 赛贝尔曲线
- UIBezierPath贝塞尔曲线
- 贝塞尔曲线UIBezierPath 详解
- 贝塞尔曲线UIBezierPath
- UIBezierPath - 贝塞尔曲线
- iOS UIBezierPath--贝塞尔曲线
- 贝塞尔曲线 UIBezierPath
- 贝塞尔曲线 UIBezierPath
- CGContextRef + UIBezierPath贝塞尔曲线
- iOS贝塞尔曲线UIBezierPath
- iOS开发 贝塞尔曲线UIBezierPath
- iOS开发 贝塞尔曲线UIBezierPath
- iOS开发 贝塞尔曲线UIBezierPath
- iOS开发 贝塞尔曲线UIBezierPath
- iOS开发 贝塞尔曲线UIBezierPath
- 标准Web系统的架构分层
- js回车事件
- Unity IK(反向运动学)初探
- plan_table中的重要列
- 前端开发学习笔记07---CSS-2
- UIBezierPath 贝尔曲线
- 智能剪刀算法学习笔记
- hibernate,session.save(entity)和transaction.commit()
- Boost库之字符串处理
- Mint安装Caffe
- leetcode(226)—— Invert Binary Tree(Python/C++)
- Windows平台下GCC编程之从键盘上输入一个3*4的整数矩阵,要求输出其最大元素的值,以及它的行号和列号
- 统计邮件被打开次数的简单方法
- 判断设备是否开启麦克风