Methods in the Uibezierpath and Cgcontext classes

Source: Internet
Author: User

methods in the Uibezierpath and Cgcontext classes

    Cgcontextsetlinewidth(CTR,Ten);//That describes the edge and fills
Cgcontextdrawpath(CTR,Kcgpathfillstroke);


Uibezierpath andCgcontextmethods in a class
voidCgcontextsetlinewidth (cgcontextref C, cgfloat width);//Set the width of the edge
voidCgcontextaddlinetopoint (cgcontextref C, CGFloat x, cgfloat y);//Add a line to a point
voidCgcontextsetlinecap (cgcontextref C, cglinecap cap); //styling the end of a segment head
voidCgcontextsetlinejoin (cgcontextref C, cglinejoin join);//style to set the inflection point of a segment
voidCgcontextsetrgbstrokecolor (cgcontextref context, cgfloat red,
CGFloat Green, CGFloat blue, cgfloat Alpha); //Set Color

+ (Uibezierpath*) Bezierpath; CreateUibezierpath
+ (Uibezierpath*) Bezierpathwithrect: (CGRect) rect; Create a quadvoidCgcontextaddrect (cgcontextref C, cgrect rect)

+ (Uibezierpath*) Bezierpathwithovalinrect: (CGRect) rect; Create a circlevoidCgcontextaddellipseinrect (cgcontextref context, CGRect rect)
+ (Uibezierpath*) Bezierpathwithroundedrect: (CGRect) Rect Cornerradius: (CGFloat) Cornerradius;//Create arcsvoidCgcontextaddarc (cgcontextref C, CGFloat x, cgfloat y, cgfloat radius, cgfloat startangle, CGFloat endangle,int clockwise)

+ (Uibezierpath*) Bezierpathwithroundedrect: (CGRect) Rect byroundingcorners: (Uirectcorner) Corners cornerradii: (cgsize) cornerradii; Create a weird quadrilateral
+ (Uibezierpath*) Bezierpathwitharccenter: (Cgpoint) Center radius: (CGFloat) Radius startangle: (CGFloat) startangle Endangle: (CGFloat) Endangle clockwise: (BOOL) clockwise; Create arcs that can be clockwise or counterclockwise
+ (Uibezierpath*) Bezierpathwithcgpath: (Cgpathref) Cgpath;

- (void) moveToPoint: (Cgpoint) point; Set the starting point
- (void) Addlinetopoint: (Cgpoint) point; Add a line to a point
- (void) Addarcwithcenter: (Cgpoint) Center radius: (CGFloat) Radius startangle: (CGFloat) startangle Endangle: (CGFloat) Endangle clockwise: (BOOL) clockwise; Add an arc that can be clockwise or counterclockwise
- (void) Closepath; // Close Path(Connect start and last point)
voidCgcontextclosepath (cgcontextref c)

Methods in the Uibezierpath and Cgcontext classes

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.