This rasterizer is used for 2D renderings of stage models.
Triangle Rasterization is inspired by this course and has been enhanced with custom performance optimisations.
In addition to only drawing the stage model, labels with the corresponding fixture id can also be added.
Each Canvas output can be customized via the RasterizerConfig struct.
See below for examples
RasterizerConfig{
RenderLabels: false,
Rotation: rasterizer.Rotation{Alpha: 80, Beta: 0, Gamma: 200},
OverrideColors: OverrideColorMap{},
CanvasConfig: CanvasConfig{
Width: 4000,
Height: 3000,
LabelFont: fontBytes, // raw bytes of an embedded ttf font
LabelDPI: 300,
LabelFontSize: 10,
}
}RasterizerConfig{
RenderLabels: true,
Rotation: rasterizer.Rotation{Alpha: 90, Beta: 0, Gamma: 180},
OverrideColors: OverrideColorMap{},
CanvasConfig: CanvasConfig{
Width: 4000,
Height: 3000,
LabelFont: fontBytes, // raw bytes of an embedded ttf font
LabelDPI: 300,
LabelFontSize: 10,
}
}
