Class CCDrawNode

#include <Geode/cocos/draw_nodes/CCDrawNode.h>
classCCDrawNode:publiccocos2d::CCNodeRGBA{ ... }

Since v2.1

CCDrawNode Node that draws dots, segments and polygons. Faster than the “drawing primitives” since they it draws everything in one single batch.

Examples0
Public static methods1
staticcocos2d::CCDrawNode*create()
No description provided
Public member functions17
virtualboolinit()
No description provided
virtualvoiddraw()
No description provided
booldrawDot(,
floatradius
,)

draw a dot at a position, with a given radius and color

booldrawSegment(,,
floatradius
,)

draw a segment with a radius and color

booldrawPolygon(,
uintcount
,,
floatborderWidth
,)

draw a polygon with a fill color and line color

when this funciton bound to js,the input params are changed
js:var drawPolygon(var verts, var fillColor,var borderWidth,var borderColor)
booldrawCircle(,,,,,)
No description provided
voiddrawCubicBezier(,,,,,)
No description provided
voiddrawPreciseCubicBezier(,,,,,)
No description provided
booldrawLines(,,,)
No description provided
booldrawRect(,,,,)
No description provided
booldrawRect(,,,)
No description provided
voiddisableDrawArea()
No description provided
voidenableDrawArea()
No description provided
voidclear()

Clear the geometry in the node’s buffer.

cocos2d::ccBlendFuncgetBlendFunc()const
No description provided
voidsetBlendFunc()
No description provided
when this function bound to js ,the input param is change
js:var setBlendFunc(var src,var dst)
voidlistenBackToForeground()

listen the event that coming to foreground on Android

Fields0
Protected member functions0
Protected fields13
_::GLuintm_uVao
;
No description provided
_::GLuintm_uVbo
;
No description provided
uintm_uBufferCapacity
;
No description provided
_::GLsizeim_nBufferCount
;
No description provided
;
No description provided
;
No description provided
boolm_bDirty
;
No description provided
boolm_bUseArea
;
No description provided
cocos2d::CCRectm_rDrawArea
;
No description provided
floatm_fMinAreaX
;
No description provided
floatm_fMaxAreaX
;
No description provided
floatm_fMaxAreaY
;
No description provided
floatm_fMinAreaY
;
No description provided