CGContextAddArcToPoint和CGContextAddArc
来源:互联网 发布:雅马哈电子琴知乎 编辑:程序博客网 时间:2024/05/16 15:59
http://www.cnblogs.com/xitang/p/3929180.html
代码如下:
- 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);
比较简单了,(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用法
- spring data jpa 自定义查询和更新的区别
- 日经春秋 20151007
- UESTC 1711 Divide 位操作模拟题
- poj 2431 Expedition 【优先队列】
- C#图像处理实践——图片不同提取
- CGContextAddArcToPoint和CGContextAddArc
- 测试用例和面试经验
- HDU2100 Lovekey
- css 清浮动
- Android 为ListView添加头部试图
- Android 图片特效(二):ColorMatrix(颜色矩阵)与图片的底片效果、老照片效果
- MFC 为树形控件添加图标
- 在Vmware/VirtualBox虚拟机环境中正确打开虚拟机
- 交叉字符串