|
cocos2d for iPhone 1.0.0
2D engine for iOS and OS X
|
#import <Availability.h>#import <Foundation/Foundation.h>

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