Quartz2D---ios的图形创建

//通过oc 创建矩形

-(void)text4{

 

    UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(20, 40, 80, 90)];

    

   // [path stroke];

    [path fill];

    

}

 

// oc   创建椭圆

-(void)text6{

    

    UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(20, 30, 200, 100)];

    [path stroke]; 

}

-(void)text8{

    //     2.绘制圆

    //  bezierPathWithArcCenter,用来表示圆心

    //     radius:表示圆的半径

    //     startAngle:表示开始角度

    //     endAngle:结束角度

    //    clockwise:用来表示顺时针还是逆时针

    //    1.表示顺时针

    //    0.表示逆时针

    

    

    UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(90, 100) radius:40 startAngle:0 endAngle:M_PI * 2 clockwise:NO];

    [path stroke];

}

 

 

/

posted @ 2016-02-24 21:21  wang_222  阅读(74)  评论(0)    收藏  举报