码迷,mamicode.com
首页 >  
搜索关键字:cgcontextref    ( 206个结果
IOS-Quartz2D(Paths元素)
Paths中的几个重要元素 Points void CGContextMoveToPoint ( CGContextRef c, CGFloat x, CGFloat y ); 指定一个点成为current point Quartz会跟踪current point一般执行完一个相关函数后,curre
分类:移动开发   时间:2016-02-21 18:23:51    阅读次数:201
CGContextRef使用简要教程
CGContextRef使用简要教程 Graphics Context是图形上下文,也可以理解为一块画布,我们可以在上面进行绘画操作,绘制完成后,将画布放到我们的view中显示即可,view看作是一个画框. CGContextRef功能强大,我们借助它可以画各种图形。开发过程中灵活运用这些技巧,可以
分类:其他好文   时间:2016-02-18 01:13:18    阅读次数:186
ios绘图之quarz2d
1 - (void)drawRect:(CGRect)rect 2 { 3 // 1.获取上下文 4 CGContextRef ctx = UIGraphicsGetCurrentContext(); 5 6 // 2.创建路径(一个path就代表一条路径) 7 ...
分类:移动开发   时间:2016-01-23 13:00:09    阅读次数:149
ios图形之图片剪切
1 - (void)drawRect:(CGRect)rect 2 { 3 // Drawing code 4 5 // 画圆, 以便于以后指定可以显示内容范围 6 CGContextRef ctx = UIGraphicsGetCurrentContext();...
分类:移动开发   时间:2016-01-23 01:21:09    阅读次数:234
ios图形上下文栈
1 - (void)drawRect:(CGRect)rect 2 { 3 // 获取上下文 4 CGContextRef ctx = UIGraphicsGetCurrentContext(); 5 6 // 保存一份最纯洁的图形上下文 7 // 调用一次该方法...
分类:移动开发   时间:2016-01-22 21:45:32    阅读次数:192
ios绘图基本图形之三角形
1 // 1.获取图形上下文 2 CGContextRef ctx = UIGraphicsGetCurrentContext(); 3 4 // 2. 绘制三角形 5 // 设置起点 6 CGContextMoveToPoint(ctx, 10...
分类:移动开发   时间:2016-01-22 17:56:45    阅读次数:152
ios绘图基本图形之圆弧
1 // 画圆弧 2 // 1.获取上下文 3 CGContextRef ctx = UIGraphicsGetCurrentContext(); 4 // 2.画圆弧 5 // x/y 圆心 6 // radius 半径 7 // start...
分类:移动开发   时间:2016-01-22 17:15:31    阅读次数:149
ios绘图基本图形之扇形
// 1.获取上下文 CGContextRef ctx = UIGraphicsGetCurrentContext(); // 2.画饼状图 // 画线 CGContextMoveToPoint(ctx, 100, 100); CGContextAddLineT...
分类:移动开发   时间:2016-01-22 17:12:33    阅读次数:153
根据UIColor对象,返回一张图片UIimage对象
-(UIImage*)createImageWithColor: (UIColor*) color{ CGRect rect=CGRectMake(0,0, 1, 1); UIGraphicsBeginImageContext(rect.size); CGContextRef co...
分类:其他好文   时间:2016-01-21 18:39:57    阅读次数:115
记录一次Quartz2D学习(五)
(四)内主要讲了绘制状态的保存与恢复本次主要讲述 缩放,旋转,平移等操作5.附加操作 5.1 旋转 TIP: 旋转操作主要是对本次渲染的图层进行旋转,旋转的中心为左上角顶点- (void)drawRect:(CGRect)rect { //获取上下文 CGContextRef ctx = U...
分类:其他好文   时间:2016-01-20 11:11:30    阅读次数:135
206条   上一页 1 ... 4 5 6 7 8 ... 21 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!