Table of Contents

Class OverlayManagerFade

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

Fade effect for overlay manager that fades the video in from black or out to black. Implements the VisioForge.Core.Types.X.VideoEffects.IOverlayManagerElement interface.

public class OverlayManagerFade : IOverlayManagerElement

Inheritance

Implements

Inherited Members

Constructors

OverlayManagerFade()

Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerFade class with default values (fade in).

public OverlayManagerFade()

OverlayManagerFade(OverlayManagerFadeType, TimeSpan, TimeSpan, bool, string)

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

public OverlayManagerFade(OverlayManagerFadeType fadeType, TimeSpan startTime, TimeSpan endTime, bool enabled = true, string name = "Fade")

Parameters

fadeType OverlayManagerFadeType

The type of fade effect.

startTime TimeSpan

The fade start time.

endTime TimeSpan

The fade end time.

enabled bool

If set to true, the effect is enabled.

name string

The effect name.

Properties

Cache

Gets or sets the cache object used internally for rendering.

public object Cache { get; set; }

Property Value

object

Easing

Gets or sets the easing function for the fade animation.

public OverlayManagerPanEasing Easing { get; set; }

Property Value

OverlayManagerPanEasing

Enabled

Gets or sets a value indicating whether this VisioForge.Core.Types.X.VideoEffects.OverlayManagerFade is enabled.

public bool Enabled { get; set; }

Property Value

bool

EndTime

Gets or sets the end time when the fade animation ends.

public TimeSpan EndTime { get; set; }

Property Value

TimeSpan

FadeColor

Gets or sets the fade color. Default is black.

public (byte R, byte G, byte B) FadeColor { get; set; }

Property Value

(byte R, byte G, byte B)

FadeType

Gets or sets the type of fade effect.

public OverlayManagerFadeType FadeType { get; set; }

Property Value

OverlayManagerFadeType

Name

Gets or sets the name of the element.

public string Name { get; set; }

Property Value

string

Opacity

Gets or sets the opacity (0.0 to 1.0). Note: Opacity is controlled by the fade animation.

public double Opacity { get; set; }

Property Value

double

Rotation

Gets or sets the rotation angle in degrees (0-360). Note: Rotation is not applicable for fade effects.

public double Rotation { get; set; }

Property Value

double

Shadow

Gets or sets the shadow settings. Note: Shadow is not applicable for fade effects and will be ignored.

public OverlayManagerShadowSettings Shadow { get; set; }

Property Value

OverlayManagerShadowSettings

StartTime

Gets or sets the start time when the fade animation begins.

public TimeSpan StartTime { get; set; }

Property Value

TimeSpan

ZIndex

Gets or sets the Z-Index (drawing order). Higher values are drawn on top. For fade effects, use a high Z-Index to ensure the fade overlay is on top.

public int ZIndex { get; set; }

Property Value

int

Methods

CreateFadeIn(TimeSpan, TimeSpan?)

Creates a fade-in effect from black.

public static OverlayManagerFade CreateFadeIn(TimeSpan duration, TimeSpan? startTime = null)

Parameters

duration TimeSpan

The duration of the fade-in.

startTime TimeSpan?

Optional start time (default is TimeSpan.Zero).

Returns

OverlayManagerFade

A configured fade-in effect.

CreateFadeOut(TimeSpan, TimeSpan)

Creates a fade-out effect to black.

public static OverlayManagerFade CreateFadeOut(TimeSpan startTime, TimeSpan duration)

Parameters

startTime TimeSpan

The start time of the fade-out.

duration TimeSpan

The duration of the fade-out.

Returns

OverlayManagerFade

A configured fade-out effect.

GetCurrentOpacity(TimeSpan)

Gets the current opacity of the fade overlay based on time.

public double GetCurrentOpacity(TimeSpan currentTime)

Parameters

currentTime TimeSpan

The current playback time.

Returns

double

The opacity (0.0 = transparent, 1.0 = opaque fade color).

ShouldDraw(TimeSpan)

Determines whether the fade effect should be drawn at the specified time.

public bool ShouldDraw(TimeSpan currentTime)

Parameters

currentTime TimeSpan

The current playback time.

Returns

bool

true if the fade should be drawn; otherwise, false.

See Also