UIBezierPath基本使用

  UIBezierPath * aPath = [UIBezierPath bezierPathWithArcCenter:point radius:5 startAngle:0 endAngle:2 * 3.14 clockwise:YES];

                

                aPath.lineWidth = 1;

                aPath.lineCapStyle = kCGLineCapRound; //线条拐角

                aPath.lineJoinStyle = kCGLineCapRound; //终点处理

                //设置填充颜色

                [[UIColor whiteColor]setFill];

                //设置线的颜色

                [[UIColor colorWithRed:1.00f green:0.36f blue:0.00f alpha:1.00f] setStroke];

                

                [aPath stroke];

                [aPath fill];

            

                //小圆

                UIBezierPath * Path = [UIBezierPath bezierPathWithArcCenter:point radius:2 startAngle:0 endAngle:2 * 3.14 clockwise:YES];

                

                Path.lineWidth = 1;

                Path.lineCapStyle = kCGLineCapRound; //线条拐角

                Path.lineJoinStyle = kCGLineCapRound; //终点处理

                

                [[UIColor colorWithRed:1.00f green:0.36f blue:0.00f alpha:1.00f] setFill];

                

                [Path stroke];

                [Path fill];

 

posted @ 2017-01-11 11:59  t天t天  阅读(121)  评论(0编辑  收藏  举报