Uibezierpath iOS Bezier curves

Source: Internet
Author: User

Record Bezier use

Draw a curve based on a rectangle

+ (Uibezierpath *) Bezierpathwithrect: (cgrect) rect

Draw a curve according to the inscribed circle of a rectangular frame

+ (Uibezierpath *) Bezierpathwithovalinrect: (cgrect) rect

Draw a curve with rounded corners based on a rectangle

+ (Uibezierpath *) Bezierpathwithroundedrect: (cgrect) Rect Cornerradius: (cgfloat) Cornerradius

In a rectangle, you can fillet a corner in the corners

+ (Uibezierpath *) Bezierpathwithroundedrect: (cgrect) rect byroundingcorners: (uirectcorner) Corners cornerRadii: ( Cgsize) cornerradii

Parameters:

Corners: Enumeration value, you can select a corner

Cornerradii: size of rounded corners

Draw an arc with a center point

+ (Uibezierpath *) Bezierpathwitharccenter: (cgpoint) Center radius: (cgfloat) Radius startangle: (cgfloat) startangle Endangle: (cgfloat) Endangle clockwise: (BOOL) clockwise;

Parameters:

Center: The coordinates of the ARC's central point

Radius: radius of the circle in which the arc is located

StartAngle: The angle value at which the arc starts

Endangle: Angle value for arc end

Clockwise: Whether to draw an arc clockwise

Draw two-dollar curve, general and movetopoint with the use of

-(void) Addquadcurvetopoint: (cgpoint) endPoint controlpoint: (cgpoint) ControlPoint

Parameters:

EndPoint: The end of the curve

ControlPoint: Drawing a datum point of a curve

Draw a curve with three dots, generally with movetopoint

-(void) Addcurvetopoint: (cgpoint) endPoint controlPoint1: (cgpoint) controlPoint1 ControlPoint2: (cgpoint) ControlPoint2

Parameters:

EndPoint: The end of the curve

ControlPoint1: Draw the first datum point of a curve

ControlPoint2: Draw the second datum point of a curve

@end

Uibezierpath iOS Bezier curves

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.