CCDrawNode Node that draws dots, segments and polygons. Faster than the “drawing primitives” since they it draws everything in one single batch.
Class CCDrawNode
#include <Geode/cocos/draw_nodes/CCDrawNode.h>
classCCDrawNode:publiccocos2d::CCNodeRGBA{ ... }
Examples0
Public static methods1
staticcocos2d::CCDrawNode*create()
No description provided
Public member functions17
virtualboolinit()
No description provided
virtualvoiddraw()
No description provided
booldrawPolygon(cocos2d::CCPoint*verts,uintcount,cocos2d::ccColor4Fconst&fillColor,floatborderWidth,cocos2d::ccColor4Fconst&borderColor)
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(cocos2d::CCRect&rect)
No description provided
voidclear()
Clear the geometry in the node’s buffer.
cocos2d::ccBlendFuncgetBlendFunc()const
No description provided
voidsetBlendFunc(cocos2d::ccBlendFuncconst&blendFunc)
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
Fields13
GLuintm_uVao;
No description provided
GLuintm_uVbo;
No description provided
uintm_uBufferCapacity;
No description provided
GLsizeim_nBufferCount;
No description provided
cocos2d::ccV2F_C4B_T2F*m_pBuffer;
No description provided
cocos2d::ccBlendFuncm_sBlendFunc;
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