Class BitmapText
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Text drawn with a BitmapFont (iPlug2 IBTextControl): fixed text or text refreshed every frame
(TextSource), integer pixel scaling, alignment, character spacing and an optional dim "unlit
segments" background that mimics LCD / VFD displays.
public class BitmapText : Control
- Inheritance
-
BitmapText
- Inherited Members
Constructors
BitmapText()
Creates a bitmap text element.
public BitmapText()
Properties
CellCount
Fixed number of character cells (0 = length of the text); unused cells show the "unlit" glyph.
public int CellCount { get; set; }
Property Value
CharacterSpacing
Extra space between glyphs, in glyph pixels before scaling.
public float CharacterSpacing { get; set; }
Property Value
CurrentText
Text currently displayed (TextSource result or Text).
[Browsable(false)]
public string CurrentText { get; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
DrawBackground
Draws a dark display background behind the text.
public bool DrawBackground { get; set; }
Property Value
Font
The font (nothing is drawn while it is null).
[Browsable(false)]
public BitmapFont? Font { get; set; }
Property Value
PixelScale
Glyph magnification: 0 = fit the height of the element, otherwise an exact factor (use integers for pixel fonts).
public float PixelScale { get; set; }
Property Value
Text
Text to display.
public string? Text { get; set; }
Property Value
TextAlignment
Horizontal alignment of the text inside the element.
public HorizontalAlignment TextAlignment { get; set; }
Property Value
TextSource
Function polled every frame for live text (meters, counters); overrides Text when set.
[Browsable(false)]
public Func<string?>? TextSource { get; set; }
Property Value
UnlitCharacter
Character drawn dimmed behind every cell (e.g. '8' or a full block for LCD displays); '\0' = none.
public char UnlitCharacter { get; set; }
Property Value
UnlitOpacity
Opacity of the unlit characters.
public float UnlitOpacity { get; set; }
Property Value
Methods
OnAttached()
Called when the element joins a host (subscribe to external events here).
protected override void OnAttached()
OnDetached()
Called when the element leaves its host (unsubscribe here).
protected override void OnDetached()
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle