随笔分类 - 绘图(Drawing)
摘要:0CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文1 CGContextMoveToPoint 开始画线2 CGContextAddLineToPoint 画直线4 CGContextAddEllipseInRect 画一椭圆4 CGContextSetLineCap 设置线条终点形状4 CGContextSetLineDash 画虚线4 CGContextAddRect 画一方框4 CGContextStrokeRect 指定矩形4 CGContextStrokeRectWithWidth 指定矩形线宽度4 CGConte
阅读全文
摘要:来自:http://www.devdiv.com/thread-38136-1-1.html核心函数是:CGContextAddArc(CGContextRef c, CGFloat x, CGFloat y, CGFloat radius, CGFloat startAngle, CGFloat endAngle, int clockwise) * CGContextRef: 图形上下文 * x,y: 开始画的坐标 * radius: 半径 * startAngle, endAngle: 开始的弧度,结束的弧度 * clockwise: 画的方向(顺时针,逆时针)有了这个函数可以画...
阅读全文