CGContextAddArcToPoint和CGContextAddArc
来源:互联网 发布:游戏超人软件 编辑:程序博客网 时间:2024/04/29 22:21
转载:http://blog.csdn.net/xiazailushang/article/details/12047137 此处是转载,非常感谢作者分享的知识
比较难的是CGContextAddArcToPoint
代码如下:
- CGContextRef context=UIGraphicsGetCurrentContext();
- CGContextSetRGBStrokeColor(context,1,0,0,1);
- CGContextMoveToPoint(context,150,50);
- CGContextAddLineToPoint(context,100,80);
- CGContextAddLineToPoint(context,130,150);
- CGContextMoveToPoint(context,150,50);//圆弧的起始点
- CGContextAddArcToPoint(context,100,80,130,150,50);
- CGContextStrokePath(context);
CGContextMoveToPoint(context,150,50);//圆弧的起始点
CGContextAddArcToPoint(context,100,80,130,150,50);
是说从(150,50)到(100,80)画一条线,然后再从(100,80)到(130,150)画一条线,从这两条线(无限延伸的) 和半径50可以确定一条弧,
而
CGContextAddArc(context, 100, 100, 30, 0, M_PI, 1); add by me :由x,y可确定圆心坐标,而0,0角度位于圆心的正下方。
比较简单了,(100,100)为圆心的坐标,30为半径,(0,M_PI)为起始角度和结束角度,1为顺时针,0 为逆时针
是说从(150,50)到(100,80)画一条线,然后再从(100,80)到(130,150)画一条线,从这两条线(无限延伸的) 和半径50可以确定一条弧
0 0
- CGContextAddArc 和 CGContextAddArcToPoint 区别
- CGContextAddArcToPoint和CGContextAddArc
- CGContextAddArcToPoint和CGContextAddArc
- CGContextAddArcToPoint和CGContextAddArc
- CGContextAddArcToPoint和CGContextAddArc
- CGContextAddArcToPoint和CGContextAddArc
- CGContextAddArcToPoint和CGContextAddArc
- CGContextAddArcToPoint和CGContextAddArc
- CGContextAddArcToPoint和CGContextAddArc的绘图使用
- CGContextAddArcToPoint与CGContextAddArc
- CGContextAddArcToPoint与CGContextAddArc
- CGContextAddArc与CGContextAddArcToPoint参数解析
- iOS绘图系列三:画弧线CGContextAddArc ,CGContextAddArcToPoint,CGContextAddCurveToPoint,UIBezierPath
- CGContextAddArc
- CGContextAddArcToPoint
- CGContextAddArc
- UIGraphicsGetCurrentContext 和CGBitmapContextCreate 使用CGContextAddArc的奇怪处
- CGContextAddArcToPoint用法
- hibernate你懂吗?
- Oracle官方并发教程(2)
- 收到CSDN寄来的杂志和T恤衫
- 数据结构之栈的push与pop操作(顺序存储结构的c实现)
- 清浮动的方法
- CGContextAddArcToPoint和CGContextAddArc
- 关于传递参数时值变化的问题
- 转屏与异步任务
- 第一次做题笔记
- &、*、[ ]
- Easyui
- 记录开发过程中遇到的bugs&解决方法
- PHP整理显示照片exif信息
- Android MediaCodec “Decoded”