Class OverlayManagerSqueezeback
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Squeezeback effect element that scales the video to a custom rectangle and draws an image overlay on top with alpha transparency support. The typical use case is a full-frame PNG image with transparent areas where the scaled video shows through. Implements the VisioForge.Core.Types.X.VideoEffects.IOverlayManagerElement interface.
public class OverlayManagerSqueezeback : IOverlayManagerElementInheritance
Implements
Inherited Members
Constructors
OverlayManagerSqueezeback()
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerSqueezeback class.
public OverlayManagerSqueezeback()OverlayManagerSqueezeback(string, Rect, Rect)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerSqueezeback class.
public OverlayManagerSqueezeback(string backgroundImageFilename, Rect videoRect, Rect backgroundRect = null)Parameters
backgroundImageFilenamestring-
The background image filename.
videoRectRect-
The video rectangle.
backgroundRectRect-
The background rectangle (null for full frame).
Properties
BackgroundAnimationEasing
Gets or sets the background animation easing function.
public OverlayManagerPanEasing BackgroundAnimationEasing { get; set; }Property Value
BackgroundAnimationEnabled
Gets or sets whether background animation is enabled.
public bool BackgroundAnimationEnabled { get; set; }Property Value
BackgroundAnimationEndTime
Gets or sets the background animation end time.
public TimeSpan BackgroundAnimationEndTime { get; set; }Property Value
BackgroundAnimationStartRect
Gets or sets the background animation start rectangle.
public Rect BackgroundAnimationStartRect { get; set; }Property Value
BackgroundAnimationStartTime
Gets or sets the background animation start time.
public TimeSpan BackgroundAnimationStartTime { get; set; }Property Value
BackgroundAnimationTargetRect
Gets or sets the background animation target rectangle.
public Rect BackgroundAnimationTargetRect { get; set; }Property Value
BackgroundFadeEasing
Gets or sets the background fade easing.
public OverlayManagerPanEasing BackgroundFadeEasing { get; set; }Property Value
BackgroundFadeEnabled
Gets or sets whether background fade is enabled.
public bool BackgroundFadeEnabled { get; set; }Property Value
BackgroundFadeEndTime
Gets or sets the background fade end time.
public TimeSpan BackgroundFadeEndTime { get; set; }Property Value
BackgroundFadeStartTime
Gets or sets the background fade start time.
public TimeSpan BackgroundFadeStartTime { get; set; }Property Value
BackgroundFadeType
Gets or sets the background fade type.
public OverlayManagerFadeType BackgroundFadeType { get; set; }Property Value
BackgroundImageFilename
Gets or sets the overlay image filename (PNG with alpha recommended).
public string BackgroundImageFilename { get; set; }Property Value
BackgroundOpacity
Gets or sets the background opacity (0.0 to 1.0).
public double BackgroundOpacity { get; set; }Property Value
BackgroundRect
Gets or sets the overlay image rectangle (position and size). Null means fill the entire frame.
public Rect BackgroundRect { get; set; }Property Value
Cache
Gets or sets the cache object used internally for rendering.
public object Cache { get; set; }Property Value
Enabled
Gets or sets whether the element is enabled.
public bool Enabled { get; set; }Property Value
EndTime
Gets or sets the end time when the effect stops being visible.
public TimeSpan EndTime { 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: Use VideoOpacity and BackgroundOpacity for individual layer opacity.
public double Opacity { get; set; }Property Value
Rotation
Gets or sets the rotation angle in degrees. Note: Rotation is not applicable for squeezeback effects.
public double Rotation { get; set; }Property Value
Shadow
Gets or sets the shadow settings. Note: Shadow is not applicable for squeezeback effects.
public OverlayManagerShadowSettings Shadow { get; set; }Property Value
StartTime
Gets or sets the start time when the effect becomes visible.
public TimeSpan StartTime { get; set; }Property Value
VideoAnimationEasing
Gets or sets the video animation easing function.
public OverlayManagerPanEasing VideoAnimationEasing { get; set; }Property Value
VideoAnimationEnabled
Gets or sets whether video animation is enabled.
public bool VideoAnimationEnabled { get; set; }Property Value
VideoAnimationEndTime
Gets or sets the video animation end time.
public TimeSpan VideoAnimationEndTime { get; set; }Property Value
VideoAnimationStartRect
Gets or sets the video animation start rectangle.
public Rect VideoAnimationStartRect { get; set; }Property Value
VideoAnimationStartTime
Gets or sets the video animation start time.
public TimeSpan VideoAnimationStartTime { get; set; }Property Value
VideoAnimationTargetRect
Gets or sets the video animation target rectangle.
public Rect VideoAnimationTargetRect { get; set; }Property Value
VideoFadeEasing
Gets or sets the video fade easing.
public OverlayManagerPanEasing VideoFadeEasing { get; set; }Property Value
VideoFadeEnabled
Gets or sets whether video fade is enabled.
public bool VideoFadeEnabled { get; set; }Property Value
VideoFadeEndTime
Gets or sets the video fade end time.
public TimeSpan VideoFadeEndTime { get; set; }Property Value
VideoFadeStartTime
Gets or sets the video fade start time.
public TimeSpan VideoFadeStartTime { get; set; }Property Value
VideoFadeType
Gets or sets the video fade type.
public OverlayManagerFadeType VideoFadeType { get; set; }Property Value
VideoOnTop
Gets or sets whether the video is drawn on top of the image. Default is false: video is drawn first (below), then image is drawn on top with alpha transparency. Set to true to draw the image first, then video on top.
public bool VideoOnTop { get; set; }Property Value
VideoOpacity
Gets or sets the video opacity (0.0 to 1.0).
public double VideoOpacity { get; set; }Property Value
VideoRect
Gets or sets the video rectangle (position and size where video is scaled).
public Rect VideoRect { get; set; }Property Value
ZIndex
Gets or sets the Z-index (should be very low to render first).
public int ZIndex { get; set; }Property Value
Methods
AnimateBackground(Rect, TimeSpan, TimeSpan, OverlayManagerPanEasing)
Starts an animation for the background rectangle.
public void AnimateBackground(Rect targetRect, TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)Parameters
targetRectRect-
The target rectangle.
startTimeTimeSpan-
The animation start time.
durationTimeSpan-
The animation duration.
easingOverlayManagerPanEasing-
The easing function.
AnimateVideo(Rect, TimeSpan, TimeSpan, OverlayManagerPanEasing)
Starts an animation for the video rectangle.
public void AnimateVideo(Rect targetRect, TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)Parameters
targetRectRect-
The target rectangle.
startTimeTimeSpan-
The animation start time.
durationTimeSpan-
The animation duration.
easingOverlayManagerPanEasing-
The easing function.
GetCurrentBackgroundOpacity(double)
Gets the current background opacity based on fade animation progress.
public double GetCurrentBackgroundOpacity(double currentTime)Parameters
currentTimedouble-
The current playback time.
Returns
- double
-
The current background opacity.
GetCurrentBackgroundRect(double, int, int)
Gets the current background rectangle based on animation progress.
public Rect GetCurrentBackgroundRect(double currentTime, int frameWidth, int frameHeight)Parameters
currentTimedouble-
The current playback time.
frameWidthint-
The frame width (used if BackgroundRect is null).
frameHeightint-
The frame height (used if BackgroundRect is null).
Returns
- Rect
-
The current background rectangle.
GetCurrentVideoOpacity(double)
Gets the current video opacity based on fade animation progress.
public double GetCurrentVideoOpacity(double currentTime)Parameters
currentTimedouble-
The current playback time.
Returns
- double
-
The current video opacity.
GetCurrentVideoRect(double)
Gets the current video rectangle based on animation progress.
public Rect GetCurrentVideoRect(double currentTime)Parameters
currentTimedouble-
The current playback time.
Returns
- Rect
-
The current video rectangle.
SetBackgroundOnTop()
Sets the background image to be on top.
public void SetBackgroundOnTop()SetVideoOnTop()
Sets the video to be on top.
public void SetVideoOnTop()StartBackgroundFadeIn(TimeSpan, TimeSpan, OverlayManagerPanEasing)
Starts a fade-in animation for the background.
public void StartBackgroundFadeIn(TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)Parameters
startTimeTimeSpan-
The fade start time.
durationTimeSpan-
The fade duration.
easingOverlayManagerPanEasing-
The easing function.
StartBackgroundFadeOut(TimeSpan, TimeSpan, OverlayManagerPanEasing)
Starts a fade-out animation for the background.
public void StartBackgroundFadeOut(TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)Parameters
startTimeTimeSpan-
The fade start time.
durationTimeSpan-
The fade duration.
easingOverlayManagerPanEasing-
The easing function.
StartVideoFadeIn(TimeSpan, TimeSpan, OverlayManagerPanEasing)
Starts a fade-in animation for the video.
public void StartVideoFadeIn(TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)Parameters
startTimeTimeSpan-
The fade start time.
durationTimeSpan-
The fade duration.
easingOverlayManagerPanEasing-
The easing function.
StartVideoFadeOut(TimeSpan, TimeSpan, OverlayManagerPanEasing)
Starts a fade-out animation for the video.
public void StartVideoFadeOut(TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)Parameters
startTimeTimeSpan-
The fade start time.
durationTimeSpan-
The fade duration.
easingOverlayManagerPanEasing-
The easing function.
SwapLayers()
Swaps the layer order (video on top / background on top).
public void SwapLayers()UpdateBackgroundImage(string, Rect)
Updates the background image.
public void UpdateBackgroundImage(string filename, Rect rect = null)Parameters
UpdateVideoPosition(Rect)
Updates the video position.
public void UpdateVideoPosition(Rect rect)Parameters
rectRect-
The new video rectangle.