Quartz2D 简介( 后续会有相关应用)第一部分 绘制直线代码示例:- (void)drawRect:(CGRect)rect{ //获取图形上下文 CGContextRef cxContext = UIGraphicsGetCurrentContext(); ...
Quartz2D 简介( 后续会有相关应用)
第一部分 绘制直线
代码示例:
- (void)drawRect:(CGRect)rect{ //获取图形上下文 CGContextRef cxContext = UIGraphicsGetCurrentContext(); //开始画图 //设置直线起点 CGContextMoveToPoint(cxContext, 0, 20); //设置直线中点 CGContextAddLineToPoint(cxContext, 100, 20); //渲染 CGContextStrokePath(cxContext);}
原标题:IOS Quartz2D简介
关键词:IOS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。