Table of Contents

Class OverlayManagerPan

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

Pan effect for overlay manager that animates the visible area between a start rectangle and a stop rectangle over time. This creates a smooth panning and zooming effect commonly used in Ken Burns-style video presentations. Implements the VisioForge.Core.Types.X.VideoEffects.IOverlayManagerElement interface.

public class OverlayManagerPan : IOverlayManagerElement

Inheritance

Implements

Inherited Members

Constructors

OverlayManagerPan()

Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerPan class with default values.

public OverlayManagerPan()

OverlayManagerPan(int, int, int, int, int, int, int, int, TimeSpan, TimeSpan, bool, string)

Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerPan class with specified start and stop rectangles.

public OverlayManagerPan(int startX, int startY, int startWidth, int startHeight, int stopX, int stopY, int stopWidth, int stopHeight, TimeSpan startTime, TimeSpan endTime, bool enabled = true, string name = "Pan")

Parameters

startX int

The start rectangle X position.

startY int

The start rectangle Y position.

startWidth int

The start rectangle width.

startHeight int

The start rectangle height.

stopX int

The stop rectangle X position.

stopY int

The stop rectangle Y position.

stopWidth int

The stop rectangle width.

stopHeight int

The stop rectangle height.

startTime TimeSpan

The animation start time.

endTime TimeSpan

The animation 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 pan animation.

public OverlayManagerPanEasing Easing { get; set; }

Property Value

OverlayManagerPanEasing

Enabled

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

public bool Enabled { get; set; }

Property Value

bool

EndTime

Gets or sets the end time when the pan animation ends. This is REQUIRED for pan effects to determine animation progress.

public TimeSpan EndTime { get; set; }

Property Value

TimeSpan

InterpolationMode

Gets or sets the interpolation mode used when scaling the video during pan.

public OverlayManagerInterpolationMode InterpolationMode { get; set; }

Property Value

OverlayManagerInterpolationMode

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 not directly applicable for pan effects.

public double Opacity { get; set; }

Property Value

double

Rotation

Gets or sets the rotation angle in degrees (0-360). Note: Rotation is applied after pan transformation.

public double Rotation { get; set; }

Property Value

double

Shadow

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

public OverlayManagerShadowSettings Shadow { get; set; }

Property Value

OverlayManagerShadowSettings

StartHeight

Gets or sets the height of the start rectangle. Use 0 or -1 for full video height.

public int StartHeight { get; set; }

Property Value

int

StartTime

Gets or sets the start time when the pan animation begins. This is REQUIRED for pan effects to determine animation progress.

public TimeSpan StartTime { get; set; }

Property Value

TimeSpan

StartWidth

Gets or sets the width of the start rectangle. Use 0 or -1 for full video width.

public int StartWidth { get; set; }

Property Value

int

StartX

Gets or sets the X position of the start rectangle (top-left corner).

public int StartX { get; set; }

Property Value

int

StartY

Gets or sets the Y position of the start rectangle (top-left corner).

public int StartY { get; set; }

Property Value

int

StopHeight

Gets or sets the height of the stop rectangle. Use 0 or -1 for full video height.

public int StopHeight { get; set; }

Property Value

int

StopWidth

Gets or sets the width of the stop rectangle. Use 0 or -1 for full video width.

public int StopWidth { get; set; }

Property Value

int

StopX

Gets or sets the X position of the stop rectangle (top-left corner).

public int StopX { get; set; }

Property Value

int

StopY

Gets or sets the Y position of the stop rectangle (top-left corner).

public int StopY { get; set; }

Property Value

int

ZIndex

Gets or sets the Z-Index (drawing order). Higher values are drawn on top. For pan effects, this determines the order of transformation application.

public int ZIndex { get; set; }

Property Value

int

Methods

FromRectangles((int X, int Y, int Width, int Height), (int X, int Y, int Width, int Height), TimeSpan, TimeSpan)

Creates a pan effect from start rectangle to stop rectangle.

public static OverlayManagerPan FromRectangles((int X, int Y, int Width, int Height) startRect, (int X, int Y, int Width, int Height) stopRect, TimeSpan startTime, TimeSpan endTime)

Parameters

startRect (int X, int Y, int Width, int Height)

The start rectangle (X, Y, Width, Height).

stopRect (int X, int Y, int Width, int Height)

The stop rectangle (X, Y, Width, Height).

startTime TimeSpan

The animation start time.

endTime TimeSpan

The animation end time.

Returns

OverlayManagerPan

A configured OverlayManagerPan instance.

GetCurrentRectangle(TimeSpan, int, int)

Calculates the current rectangle based on the animation progress.

public (double X, double Y, double Width, double Height) GetCurrentRectangle(TimeSpan currentTime, int videoWidth, int videoHeight)

Parameters

currentTime TimeSpan

The current playback time.

videoWidth int

The full video width (for resolving -1 values).

videoHeight int

The full video height (for resolving -1 values).

Returns

(double X, double Y, double Width, double Height)

The interpolated rectangle (X, Y, Width, Height) for the current time.

See Also