绘椭圆想行的两种方法 等同
///one//
//创建画布
CGContextRef contextref = UIGraphicsGetCurrentContext();
//设置画笔宽度
CGContextSetLineWidth(contextref, 5.0f);
//设置画笔颜色
CGContextSetRGBStrokeColor(contextref, 0.0, 1.0, 1.0, 1.0);
//添加椭圆
CGContextAddEllipseInRect(contextref, CGRectMake(30.0, 30.0, 80.0,80.0));
//添加路径
CGContextStrokePath(contextref);
/ two
//填充颜色
CGContextSetRGBFillColor(contextref, 0.0, 0.0, 1.0, 1.0);
//画个椭圆行
CGContextStrokeEllipseInRect(contextref, CGRectMake(100.0, 120.0, 60.0, 60.0));
//对圆形经行填充
CGContextFillEllipseInRect(contextref, CGRectMake(100.0, 120, 60.0, 60.0));