Interface BaseLayerOptions

Options accepted by BaseLayer and all its subclasses. Required properties are always initialised with defaults by the layer constructor.

interface BaseLayerOptions {
    width?: number;
    height?: number;
    position?: LayerPosition;
    visible: boolean;
    opacity: number;
    renderers: RendererEntry[];
    backgroundColor?: string;
    backgroundOpacity?: number;
    borderColor?: string;
    borderWidth?: number;
}

Hierarchy (view full)

Properties

width?: number

Layer canvas width in pixels. Defaults to DMD width.

height?: number

Layer canvas height in pixels. Defaults to DMD height.

position?: LayerPosition

Layer position within the DMD frame.

visible: boolean

Whether the layer is visible. Default: true.

opacity: number

Layer opacity between 0 (transparent) and 1 (opaque). Default: 1.

renderers: RendererEntry[]

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: [].

backgroundColor?: string

Background fill color drawn behind the layer content. Transparent if omitted.

backgroundOpacity?: number

Background fill opacity 0–1. Default: 1.

borderColor?: string

Border stroke color drawn around the layer edge. No border if omitted.

borderWidth?: number

Border stroke width in pixels. Default: 0.