CCDrawNode Class Reference
| Inherits from | CCNode : CCResponder : NSObject |
| Declared in | CCDrawNode.h |
Overview
CCDrawNode Node that draws dots, segments and polygons. The geometry will be saved, so primitives does not need to be redrawn for each frame Faster than the “drawing primitives” since they it draws everything in one single batch.
Tasks
Primitive Drawing Methods
-
– drawDot:radius:color: -
– drawSegmentFrom:to:radius:color: -
– drawPolyWithVerts:count:fillColor:borderWidth:borderColor:
Draw Node Management
Instance Methods
drawDot:radius:color:
Draw a dot at a position, with a given radius and color.
- (void)drawDot:(CGPoint)pos radius:(CGFloat)radius color:(CCColor *)colorParameters
- pos
Dot position.
- radius
Dot radius.
- color
Dot color.
Declared In
CCDrawNode.hdrawPolyWithVerts:count:fillColor:borderWidth:borderColor:
Draw a polygon with a fill color and line color.
- (void)drawPolyWithVerts:(const CGPoint *)verts count:(NSUInteger)count fillColor:(CCColor *)fill borderWidth:(CGFloat)width borderColor:(CCColor *)lineParameters
- verts
Array of CGPoints, containing the vertices.
- count
Number of vertices.
- fill
Polygon fill color.
- width
Polygon outline width.
- line
Polygon outline color.
Declared In
CCDrawNode.h