Class OverlayManagerScrollingText
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Overlay Manager Scrolling Text element for displaying scrolling text overlays. Implements the VisioForge.Core.Types.X.VideoEffects.IOverlayManagerElement.
public class OverlayManagerScrollingText : IOverlayManagerElementInheritance
Implements
Inherited Members
Constructors
OverlayManagerScrollingText()
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerScrollingText class.
public OverlayManagerScrollingText()OverlayManagerScrollingText(string, int, int, int, ScrollDirection)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerScrollingText class.
public OverlayManagerScrollingText(string text, int x = 0, int y = 100, int speed = 5, ScrollDirection direction = ScrollDirection.RightToLeft)Parameters
textstring-
The text to scroll.
xint-
The X position.
yint-
The Y position.
speedint-
The scrolling speed in pixels per frame.
directionScrollDirection-
The scroll direction.
Properties
BackgroundColor
Gets or sets the background color (used only when BackgroundTransparent is false).
public SKColor BackgroundColor { get; set; }Property Value
BackgroundTransparent
Gets or sets a value indicating whether the background is transparent.
public bool BackgroundTransparent { get; set; }Property Value
Cache
Gets or sets the cache object used internally for rendering optimization.
public object Cache { get; set; }Property Value
Color
Gets or sets the text color.
public SKColor Color { get; set; }Property Value
DefaultHeight
Gets or sets the default height to use when Height is set to 0 for vertical scrolling. This value should typically match the video height.
public int DefaultHeight { get; set; }Property Value
DefaultWidth
Gets or sets the default width to use when Width is set to 0. This value should typically match the video width.
public int DefaultWidth { get; set; }Property Value
Direction
Gets or sets the scroll direction.
public ScrollDirection Direction { 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). When StartTime and EndTime are both set to TimeSpan.Zero, the overlay is always visible.
public TimeSpan EndTime { get; set; }Property Value
FirstFrameNumber
Gets or sets the first frame number when scrolling started. This is used internally for calculating scroll position. Set to -1 to reset the scroll position.
public long FirstFrameNumber { get; set; }Property Value
Font
Gets or sets the font settings.
public FontSettings Font { get; set; }Property Value
Height
Gets or sets the height of the scrolling text area. Set to 0 or negative for auto (based on font size).
public int Height { get; set; }Property Value
Infinite
Gets or sets a value indicating whether the scrolling text loops infinitely. When true, the text will restart from the beginning after scrolling off screen.
public bool Infinite { get; set; }Property Value
Name
Gets or sets the name of the overlay element.
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). Note: Rotation is applied to the entire scrolling text area.
public double Rotation { get; set; }Property Value
Shadow
Gets or sets the shadow settings.
public OverlayManagerShadowSettings Shadow { get; set; }Property Value
Speed
Gets or sets the scrolling speed in pixels per frame. Higher values result in faster scrolling.
public int Speed { get; set; }Property Value
StartTime
Gets or sets the start time (optional). When StartTime and EndTime are both set to TimeSpan.Zero, the overlay is always visible.
public TimeSpan StartTime { get; set; }Property Value
Text
Gets or sets the text content to scroll.
public string Text { get; set; }Property Value
TextRestarted
Gets or sets the text restarted delegate. Called when the scrolling text loops back to the beginning (when Infinite is true).
public EventHandler TextRestarted { get; set; }Property Value
Width
Gets or sets the width of the scrolling text area. Set to 0 or negative for auto (uses DefaultWidth).
public int Width { get; set; }Property Value
X
Gets or sets the X position of the scrolling text area.
public int X { get; set; }Property Value
Y
Gets or sets the Y position of the scrolling text area.
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; }Property Value
Methods
Reset()
Resets the scrolling position back to the beginning.
public void Reset()Update()
Forces a re-measurement of the text dimensions. Call this after changing the text content or font settings.
public void Update()