nodesnim/private/templates

Templates

template voidTemplate()
template calculateDrawableCorners(shadow: bool = false)
Calculates vertex positions.
template drawTemplate(drawtype, color, function, secondfunc: untyped): untyped

Draws colorized vertexes

Arguments:

  • drawtype - draw type, like GL_POLYGON
  • color - color for border drawing.
  • function - function called before glBegin
  • secondfunc - function called after glEnd
template drawTemplate(drawtype, color, function, secondfunc: untyped;
                      is_gradient: bool): untyped

Draws colorized vertexes

Arguments:

  • drawtype - draw type, like GL_POLYGON
  • color - color for border drawing.
  • function - function called before glBegin
  • secondfunc - function called after glEnd
  • is_gradient - true when drawtype is GL_POLYGON.
template drawTextureTemplate(drawtype, color, function, secondfunc: untyped): untyped
template drawablepattern(type: untyped): untyped
template nodepattern(nodetype: untyped): untyped
This used in childs of the NodeObj.
template node2dpattern(): untyped
template node3dpattern()
template controlpattern(): untyped
template chartDrawAxis(self: untyped)
template chartDrawRadar()
template chartDrawLine()
template chartDrawBar()
template chartDrawPie(chart_data: untyped)
template setTextTemplate(self, text, save_properties, t: untyped): untyped

Template for methods like Label.setText.

Arguments:

  • self - NodeRef;
  • text - new text;
  • save_properties - save style;
  • t - StyleText field name;
template colorToRenderer(color_argument_name: untyped): untyped

Translates ColorRef object to uint32 tuple and changes renderer draw color.

Arguments:

  • color_argument_name` - ColorRef variable.
template canvasDrawGL(canvas: untyped): untyped
Translates canvas surface to OpenGL texture.