Skip to main content

Module definition

Module definition 

Source
Expand description

The description of a physical lamp: its pixels, the shapes they are drawn with and the modes that group them. Definitions are assets.

Modules§

generators
Laying out many pixels at once: a grid, a ring, a path. Positions are in metres in the definition’s frame, x to the right and y down like the canvas, and pixels come out in DMX order.
svg_geometry
The geometry of SVG paths, as the code reading drawings into definitions needs it: the size of a drawing unit and Bézier curves cut into straight pieces. No SVG library here, so the model stays light.

Structs§

FixtureDefinition
Everything relevant about a physical lamp which may be installed. Physical dimensions are authoritative; a layout only places and scales the fixture.
Mode
A mode maps every pixel of a definition onto a pixel group.
Model
A shape, defined once and referenced by the pixels that use it — GDTF’s Models. Position and rotation live on the referencing pixel, never in the SVG, so 64 identical emitters cost one drawing.
Photo
A photograph or drawing of the lamp, placed in the definition’s frame so it shows which way the lamp hangs. A PNG, JPEG or SVG in the asset repository, named by its path there (see asset::picture).
Pixel
ScalingIter
An iterator over the variants of Scaling
UnknownColorOrder
Text that names none of the six orders.

Enums§

ColorOrder
One of the six orders of red, green and blue. It reads as its letters (“GRB”) and parses from them in any case: “grb” is GRB.
DefinitionError
Why a definition edit was refused.
EmittedColor
A single emitter channel of a pixel. The DMX offset of a channel is its position in the fixture’s flattened pixel/channel order.
Scaling
Which distortions a layout may apply to a fixture.

Constants§

DEFAULT_PHOTO_OPACITY
How strongly a newly set photo shows: faint, so the pixels stay in front.

Functions§

group_ids
Group ids for keys, one per key: equal keys share a group, and the groups are numbered by first appearance, so the ids run 0..n in order.