Optional widthLayer canvas width in pixels. Defaults to DMD width.
Optional heightLayer canvas height in pixels. Defaults to DMD height.
Optional positionLayer position within the DMD frame.
Whether the layer is visible. Default: true.
Layer opacity between 0 (transparent) and 1 (opaque). Default: 1.
Renderers to register (and optionally activate) on this layer.
Each entry is either a RendererInstanceEntry (pre-created instance)
or a RendererClassEntry (class instantiated by the layer with the
correct dimensions). Set active: false to register without activating.
Default: [].
Optional backgroundBackground fill color drawn behind the layer content. Transparent if omitted.
Optional backgroundBackground fill opacity 0–1. Default: 1.
Optional borderBorder stroke color drawn around the layer edge. No border if omitted.
Optional borderBorder stroke width in pixels. Default: 0.
Optional topTop position of the text within the layer, in pixels or as a percentage string
(e.g. '50%'). Overrides vAlign when set. The value is the y passed to
fillText, so textBaseline decides what it anchors (with the default
'top' baseline, the top of the em square - which sits slightly above the glyph
ink). Unset by default, so vAlign places the text.
Optional leftLeft position of the text within the layer, in pixels or as a percentage string
(e.g. '50%'). Overrides hAlign when set. Unset by default, so hAlign
places the text.
Text fill colour. Default: Colors.White.
Font size value. Default: '10'.
Font size unit (e.g. '%', 'px'). Default: '%'.
Font family name. Default: 'Arial'.
Font style (e.g. 'normal', 'italic'). Default: 'normal'.
Canvas text baseline. Default: 'top'.
Horizontal pixel offset. Default: 0.
Vertical pixel offset. Default: 0.
Stroke width in pixels. Default: 0.
Stroke colour. Default: Colors.Black.
Shrink font until text fits the layer width. Default: false.
Optional adjustControls how the adjustWidth-computed size can change across setText() calls:
'both': recompute freely each time - size can grow or shrink between calls.'shrink': size only ever shrinks across calls - a later, narrower text won't
grow it back above a previous, wider text's shrunk size.'expand': size only ever grows across calls - a later, wider text won't shrink
it below a previous size (may overflow instead).
Default: 'both'.Outline width in pixels. Default: 0.
Outline colour. Default: Colors.Black.
Enable sub-pixel antialiasing. Default: true.
Optional textText content.
Optional hHorizontal alignment of the text within the layer. Ignored when left is set. Default: 'center'.
Optional vVertical alignment of the text within the layer. Ignored when top is set. Default: 'middle'.
Options for TextLayer. Required properties are always initialised with defaults by the TextLayer constructor.