#import <CoreGraphics/CGGeometry.h>#import <objc/objc.h>

Go to the source code of this file.
Functions | |
| void | ccDrawPoint (CGPoint point) |
| void | ccDrawPoints (CGPoint *points, unsigned int numberOfPoints) |
| void | ccDrawLine (CGPoint origin, CGPoint destination) |
| void | ccDrawPoly (CGPoint *vertices, int numOfVertices, BOOL closePolygon) |
| void | ccDrawCircle (CGPoint center, float radius, float angle, int segments, BOOL drawLineToCenter) |
| void | ccDrawQuadBezier (CGPoint origin, CGPoint control, CGPoint destination, int segments) |
| void | ccDrawCubicBezier (CGPoint origin, CGPoint control1, CGPoint control2, CGPoint destination, int segments) |
Drawing OpenGL ES primitives.
You can change the color, width and other property by calling the glColor4ub(), glLineWitdh(), glPointSize().
Definition in file CCDrawingPrimitives.h.
| void ccDrawCircle | ( | CGPoint | center, | |
| float | radius, | |||
| float | angle, | |||
| int | segments, | |||
| BOOL | drawLineToCenter | |||
| ) |
draws a circle given the center, radius and number of segments.
| void ccDrawCubicBezier | ( | CGPoint | origin, | |
| CGPoint | control1, | |||
| CGPoint | control2, | |||
| CGPoint | destination, | |||
| int | segments | |||
| ) |
draws a cubic bezier path
| void ccDrawLine | ( | CGPoint | origin, | |
| CGPoint | destination | |||
| ) |
draws a line given the origin and destination point
| void ccDrawPoint | ( | CGPoint | point | ) |
draws a point given x and y coordinate
| void ccDrawPoints | ( | CGPoint * | points, | |
| unsigned int | numberOfPoints | |||
| ) |
draws an array of points.
| void ccDrawPoly | ( | CGPoint * | vertices, | |
| int | numOfVertices, | |||
| BOOL | closePolygon | |||
| ) |
draws a poligon given a pointer to CGPoint coordiantes and the number of vertices. The polygon can be closed or open
| void ccDrawQuadBezier | ( | CGPoint | origin, | |
| CGPoint | control, | |||
| CGPoint | destination, | |||
| int | segments | |||
| ) |
draws a quad bezier path