1. Commonly used graphic functions are as follows. 1ccDrawColor4B (GLubyter, GLubyteg, GLubyteb, GLubytea): sets the painting color. Parameter 1: Red weight. Parameter 2: green component. Parameter 3: blue component. Parameter 4: transparency. 2 glLineWidth (GLfloatwidth): Set the line width. Parameter: width
1. Commonly used graphic functions are as follows. 1 ccDrawColor4B (GLubyte r, GLubyte g, GLubyte B, GLubyte a) function: Set the painting color. Parameter 1: Red weight. Parameter 2: green component. Parameter 3: blue component. Parameter 4: transparency. 2 glLineWidth (GLfloat width): Set the line width. Parameter: width
1. Commonly used graphic functions are as follows.
<1> ccDrawColor4B (GLubyte r, GLubyte g, GLubyte B, GLubyte)
Purpose:Set the painting color.
Parameter 1:Red weight.
Parameter 2:Green component.
Parameter 3:Blue component.
Parameter 4:Transparency.
<2> glLineWidth (GLfloat width)
Purpose:Set the line width.
Parameters:Width value.
<3> ccDrawLine (const CCPoint & origin, const CCPoint & destination)
Purpose:Draw a straight line.
Parameter 1:Start coordinate.
Parameter 2:End coordinate.
<4> ccPointSize (GLfloat pointSize)
Purpose:Set the size of each vertex.
Parameters:Point size.
<5> ccDrawPoint (const CCPoint & point)
Purpose:Draw a vertex.
Parameters:Coordinates of the vertex.
<6> ccDrawCircle (const CCPoint & center, float radius, float angle, unsigned int segments, bool drawLineToCenter)
Purpose:Draw a circle.
Parameter 1: Center Coordinate.
Parameter 2:Radius length.
Parameter 3:The angle of the circle.
Parameter 4:Angle.
Parameter 5:Number of points.
<7> ccDrawPoly (const CCPoint * poli, unsigned int numberOfPoints, bool closePolygon)
Purpose:Draw a hollow polygon.
Parameter 1:Vertex array.
Parameter 2:Point quantity.
Parameter 3:Whether to automatically close the polygon.
<8> ccDrawSolidRect (CCPoint origin, CCPoint destination, ccColor4F color)
Purpose:Draw a filled rectangle.
Parameter 1:Vertex array.
Parameter 2:Point quantity.
Parameter 3:The color of the rectangle.
<9> ccDrawRect (CCPoint origin, CCPoint destination)
Purpose:Draw a hollow rectangle.
Parameter 1:Vertex array.
Parameter 2:Point quantity.
<10> ccdrawquadbezr (const CCPoint & origin, const CCPoint & control, const CCPoint & destination, unsigned int segments)
Purpose:Draw the besell curve.
Parameter 1:Start Point.
Parameter 2:Control Point.
Parameter 3:End Point.
Parameter 4:Number of vertices.
<11> ccdrawcubes (conts CCPoint & origin, const CCPoint & control1, const CCPoint & control2, const CCPoint & destination, unsigned int segments)
Purpose:Draw a three-dimensional besell curve.
Parameter 1:Start Point.
Parameter 2:Control Point 1.
Parameter 3:Control Point 2.
Parameter 4:End Point.
Parameter 5:Number of vertices.