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 : IOverlayManagerElementInheritance
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
fadeTypeOverlayManagerFadeType-
The type of fade effect.
startTimeTimeSpan-
The fade start time.
endTimeTimeSpan-
The fade end time.
enabledbool-
If set to
true, the effect is enabled. namestring-
The effect name.
Properties
Cache
Gets or sets the cache object used internally for rendering.
public object Cache { get; set; }Property Value
Easing
Gets or sets the easing function for the fade animation.
public OverlayManagerPanEasing Easing { get; set; }Property Value
Enabled
Gets or sets a value indicating whether this VisioForge.Core.Types.X.VideoEffects.OverlayManagerFade is enabled.
public bool Enabled { get; set; }Property Value
EndTime
Gets or sets the end time when the fade animation ends.
public TimeSpan EndTime { get; set; }Property Value
FadeColor
Gets or sets the fade color. Default is black.
public (byte R, byte G, byte B) FadeColor { get; set; }Property Value
FadeType
Gets or sets the type of fade effect.
public OverlayManagerFadeType FadeType { get; set; }Property Value
Name
Gets or sets the name of the element.
public string Name { get; set; }Property Value
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
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
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
StartTime
Gets or sets the start time when the fade animation begins.
public TimeSpan StartTime { get; set; }Property Value
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
Methods
CreateFadeIn(TimeSpan, TimeSpan?)
Creates a fade-in effect from black.
public static OverlayManagerFade CreateFadeIn(TimeSpan duration, TimeSpan? startTime = null)Parameters
durationTimeSpan-
The duration of the fade-in.
startTimeTimeSpan?-
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
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
currentTimeTimeSpan-
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
currentTimeTimeSpan-
The current playback time.
Returns
- bool
-
trueif the fade should be drawn; otherwise,false.