Class OverlayManagerText
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Overlay Manager Text element. Implements the VisioForge.Core.Types.X.VideoEffects.IOverlayManagerElement.
public class OverlayManagerText : IOverlayManagerElementInheritance
Derived
Implements
Inherited Members
Constructors
OverlayManagerText()
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerText class.
public OverlayManagerText()OverlayManagerText(string, int, int)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerText class.
public OverlayManagerText(string text, int x = 100, int y = 100)Parameters
Properties
Background
Gets or sets the background.
public IOverlayManagerBackground Background { get; set; }Property Value
Cache
Gets or sets the cache.
public object Cache { get; set; }Property Value
Color
Gets or sets the color.
public SKColor Color { get; set; }Property Value
CustomHeight
Gets or sets the custom height.
public int CustomHeight { get; set; }Property Value
CustomWidth
Gets or sets the custom width.
public int CustomWidth { get; set; }Property Value
Enabled
Gets or sets a value indicating whether this VisioForge.Core.Types.X.VideoEffects.IOverlayManagerElement is enabled.
public bool Enabled { get; set; }Property Value
EndTime
Gets or sets the end time (optional).
public TimeSpan EndTime { get; set; }Property Value
Font
Gets or sets the font.
public FontSettings Font { get; set; }Property Value
Name
Gets or sets the name.
public string Name { get; set; }Property Value
Opacity
Gets or sets the opacity (0.0 to 1.0).
public double Opacity { get; set; }Property Value
Rotation
Gets or sets the rotation angle in degrees (0-360).
public double Rotation { get; set; }Property Value
Shadow
Gets or sets the shadow settings.
public OverlayManagerShadowSettings Shadow { get; set; }Property Value
StartTime
Gets or sets the start time (optional).
public TimeSpan StartTime { get; set; }Property Value
Text
Gets or sets the text.
public string Text { get; set; }Property Value
TextProvider
Gets or sets a callback supplying the text for every frame. When set it takes precedence over VisioForge.Core.Types.X.VideoEffects.OverlayManagerText.Text; returning null falls back to it. The argument is the frame timestamp, counted from the pipeline start.
public Func<TimeSpan, string> TextProvider { get; set; }Property Value
Remarks
The callback is invoked once per frame on the GStreamer streaming thread, so it must be fast and must not block. The text layout cache compares the returned string, so returning an unchanged value costs nothing beyond the call itself, and only a changed value pays for a re-measure.
It runs while the overlay list is locked, the same lock Video_Overlay_Add and
Video_Overlay_Remove take. Blocking on another thread from here therefore risks a
deadlock, not merely a dropped frame: a callback that calls Dispatcher.Invoke to
read a UI value deadlocks outright if the UI thread is adding or removing an overlay at
that moment. Read a field the UI thread has already written instead.
X
Gets or sets the X position of the top-left corner of the text, in pixels. Zero is the left edge of the frame.
public int X { get; set; }Property Value
Y
Gets or sets the Y position of the top-left corner of the text, in pixels. Zero is the top edge of the frame; the first line is drawn fully visible there.
public int Y { get; set; }Property Value
ZIndex
Gets or sets the Z-Index (drawing order). Higher values are drawn on top.
public int ZIndex { get; set; }