//Add a Bezier curveCgcontextmovetopoint (Cgcontext, Max, -);//move to a pointCgcontextaddcurvetopoint (Cgcontext, Max, -, -, -, -, Max);//draw the curve of the Searle, the point accompanies the movement, these three parameters, each 2 is a parameter 1. Point ( Max, -) represents the start point2. Point ( -, -) is represented as a control point3. Point ( -, Max) is indicated as the terminating point//All in all: The tangent of a curve is plotted at the intersection of the control pointCgcontextaddcurvetopoint (Cgcontext, -, Max, -, $, Max, $);//Cgcontextaddcurvetopoint (Cgcontext, Max, $, $, $, $, Max);//Cgcontextaddcurvetopoint (Cgcontext, $, Max, $, -, Max, -);//[[Uicolor Redcolor] setfill];//Fill ColorCgcontextdrawpath (Cgcontext, Kcgpathstroke);//draw on the brush//Cgcontextaddlinetopoint (Cgcontext,,);
$ ); // Add a line
// Add a rectangle Cgcontextaddrect (Cgcontext, CGRectMake ());
//Add radiansCgcontextaddarc (Cgcontext, -, -, -,3.14/2, the*3.14/ the,1);//1. Origin Point (100,100)//2. Radius//3. Start Radian 3.14/2, 3.14 is pi//4. End Radian 270* 3.14/180//5. Counterclockwise for 1,0 to clockwise//----------Explain the arc of the circle, the radian is calculated in a clockwise direction, then the starting and ending radians are determined, and the radian is determined so that it is easier to draw in the clockwise direction.
Cgcontextclosepath (Cgcontext); // closed Curve
Cgcontextaddellipseinrect (Cgcontext, CGRectMake ()); // to cut an ellipse inside a rectangle is actually relatively simple.
iOS Draw lines