Skip to end of metadata
Go to start of metadata

Table of Contents

Extends: Group 


The Rectangle node class draws a solid color rectangle with the top/left corner of the rectangle drawn at the origin of the node local coordinate system. Because the Rectangle node class extends the Group node class, it can have child nodes. For example, a Rectangle node might have a child Label node, resulting in text being drawn inside of a box.


The following are examples using the Rectangle node.



widthfloat0.0Specifies the width of the rectangle in local coordinates
heightfloat0.0Specifies the height of rectangle in local coordinates
colorcolor (string containing hex value e.g. RGBA)0xFFFFFFFFSpecifies the color of the rectangle
Specifies if the rectangle should be alpha blended with the nodes that are behind it

Available since firmware version 8


Fields derived from the Group base class can also be used.


Rectangle Node Class Example


Rotation of Rectangles is supported.  On platforms that do not support OpenGL, only rotations of 0, 90, 180, and 270 degrees are supported.


  • No labels