Bitmap Element
The Bitmap element renders frame-based image strips for meters, digits, and sprite-like indicators.
Create one with ui.addBitmap() and the shared General Elements Options, General Tooltip Options, and Mouse Events Callback.
js
ui.addBitmap(options);Table of Contents
Bitmap Options
value
- Type:
number - Default:
0.0 - Description: Current value used to select frame(s).
bitmapImageName
- Type:
string - Default:
"" - Description: Path to the bitmap strip image.
bitmapFrames
- Type:
number - Default:
1 - Description: Number of frames in the strip.
INFO
Values less than or equal to 0 are clamped to 1.
bitmapZeroFrame
- Type:
boolean - Default:
false - Description: Controls whether frame
0is reserved for zero when using normalized (non-extend) mode.
bitmapExtend
- Type:
boolean - Default:
false - Description: Enables multi-digit rendering mode using repeated frames.
minValue, maxValue
- Type:
number - Defaults:
0.0and1.0 - Description: Range used to normalize
valuewhenbitmapExtendisfalse.
INFO
If maxValue <= minValue, max is internally adjusted to avoid zero-width range.
bitmapOrientation
- Type:
string - Default:
"auto" - Description: Frame strip orientation.
Valid values
"auto""horizontal""vertical"
bitmapDigits
- Type:
number - Default:
0 - Description: Fixed digit count in
bitmapExtendmode.0means auto digits.
bitmapAlign
- Type:
string - Default:
"left" - Description: Horizontal alignment for extended digit rendering.
Valid values
"left""center""right"
bitmapSeparation
- Type:
number - Default:
0 - Description: Pixel spacing between digits in
bitmapExtendmode.
Shared Image Options
Bitmap supports:
imageAlphagrayscaleuseExifOrientationimageTintimageFlipcolorMatrix
WARNING
imageCrop is ignored for Bitmap element semantics.
Runtime Notes
ui.addBitmap()requires an options object.- If
idalready exists, the previous element is replaced. - Bitmap is frame-driven: parser forces
widthandheightto auto mode for this element.
Example
javascript
import { widgetWindow } from "novadesk";
new widgetWindow({
id: "bitmapExample",
width: 520,
height: 260,
backgroundColor: "rgba(20, 24, 31, 0.96)",
script: "ui/script.ui.js"
});