Fork me on GitHub

Quartz2D简单绘制之圆角矩形

// 画一个圆角矩形
CGContextRef contextRef = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(contextRef, 1.0f, 1.0f, 1.0f, 1);
CGContextSetLineWidth(contextRef, 20.0f);
CGContextAddRect(contextRef, CGRectMake(50.0f, 50.0f, 100.0f, 100.0f));
CGContextStrokePath(contextRef);
CGLineJoin lineJoin = kCGLineJoinRound;
CGContextSetLineJoin(contextRef, lineJoin);
CGContextStrokePath(contextRef);



posted on 2012-03-09 22:55  pengyingh  阅读(474)  评论(0)    收藏  举报

导航