Table of Contents

Class TextOverlayVideoEffect

Namespace
VisioForge.Core.Types.X.VideoEffects
Assembly
VisioForge.Core.dll

Represents a text overlay effect that renders text, timestamps, or system time on video frames.

public class TextOverlayVideoEffect : BaseVideoEffect, IBaseVideoEffect

Inheritance

Implements

Inherited Members

Remarks

SDK Availability: VideoCaptureCoreX, MediaPlayerCoreX, VideoEditCoreX, Media Blocks SDK

Platform Support: Windows, Linux, macOS (not available on Android/iOS)

The text overlay effect provides comprehensive text rendering capabilities with support for multiple modes (static text, system time, timestamps), extensive formatting options, and flexible positioning. Uses SkiaSharp for high-quality text rendering with anti-aliasing and font support.

Key Features:

  • Multiple Modes: Static text, system time display, timestamp overlay
  • Flexible Positioning: Alignment-based (top/bottom/left/right/center) or absolute positioning
  • Rich Formatting: Font family, size, weight, style, color, outline
  • Text Wrapping: Word, character, or combined wrapping modes
  • Background Shading: Optional semi-transparent background for readability
  • Auto-Sizing: Automatic font size adjustment based on video resolution

Common Use Cases:

  • Video watermarks and branding
  • Timestamp overlays for surveillance and logging
  • Real-time system time display
  • Subtitles and captions
  • Debug information overlays

For Classic SDK equivalents, see VideoEffectTextLogo and VideoEffectScrollingTextLogo (Windows only).

Performance Note: Text rendering is performed on CPU. For overlay-intensive applications, consider using the OverlayManager system for better performance with multiple overlays.

Constructors

TextOverlayVideoEffect(string)

Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.TextOverlayVideoEffect class.

public TextOverlayVideoEffect(string name = "text_overlay")

Parameters

name string

The name.

Fields

DefaultName

The default name.

public static string DefaultName

Field Value

string

Properties

AutoAjustSize

Gets or sets a value indicating whether automatically adjust font size to screen-size.

public bool AutoAjustSize { get; set; }

Property Value

bool

Color

Gets or sets color to use for text (big-endian ARGB).

public SKColor Color { get; set; }

Property Value

SKColor

DeltaX

Gets or sets shift X position to the left or to the right. Unit is pixels.

public int DeltaX { get; set; }

Property Value

int

DeltaY

Gets or sets shift Y position up or down. Unit is pixels.

public int DeltaY { get; set; }

Property Value

int

Font

Gets or sets font to be used for rendering.

public FontSettings Font { get; set; }

Property Value

FontSettings

HorizontalAlignment

Gets or sets horizontal alignment of the text.

public TextOverlayHAlign HorizontalAlignment { get; set; }

Property Value

TextOverlayHAlign

LineAignment

Gets or sets alignment of text lines relative to each other (for multi-line text).

public TextOverlayLineAlign LineAignment { get; set; }

Property Value

TextOverlayLineAlign

Mode

Gets or sets the overlay mode determining what text content to display.

public TextOverlayMode Mode { get; set; }

Property Value

TextOverlayMode

OutlineColor

Gets or sets color to use for outline the text (big-endian ARGB).

public SKColor OutlineColor { get; set; }

Property Value

SKColor

Shading

Gets or sets a value indicating whether to shade the background under the text area.

public bool Shading { get; set; }

Property Value

bool

Text

Gets or sets the text content to display.

public string Text { get; set; }

Property Value

string

Remarks

Text can include line breaks for multi-line display. Use VisioForge.Core.Types.X.VideoEffects.TextOverlayVideoEffect.LineAignment to control alignment of multiple lines relative to each other.

TimeFormat

Gets or sets the time format string for system time display.

public string TimeFormat { get; set; }

Property Value

string

TurnOff

Gets or sets a value indicating whether text rendering disabled.

public bool TurnOff { get; set; }

Property Value

bool

VerticalAlignment

Gets or sets vertical alignment of the text.

public TextOverlayVAlign VerticalAlignment { get; set; }

Property Value

TextOverlayVAlign

VerticalRender

Gets or sets a value indicating whether vertical render enabled.

public bool VerticalRender { get; set; }

Property Value

bool

WrapMode

Gets or sets whether to wrap the text and if so how.

public TextOverlayWrapMode WrapMode { get; set; }

Property Value

TextOverlayWrapMode

XPad

Gets or sets horizontal paddding when using left/right alignment.

public int XPad { get; set; }

Property Value

int

XPos

Gets or sets horizontal position when using position alignment.

public double XPos { get; set; }

Property Value

double

YPad

Gets or sets vertical padding when using top/bottom alignment.

public int YPad { get; set; }

Property Value

int

YPos

Gets or sets vertical position when using position alignment.

public double YPos { get; set; }

Property Value

double

Methods

ToSettings()

Converts to settings.

public TextOverlaySettings ToSettings()

Returns

TextOverlaySettings

TextOverlaySettings.