Table of Contents

Class OverlayManagerImage

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

Overlay Manager image. Implements the IDisposable.

public class OverlayManagerImage : IOverlayManagerElement, IDisposable

Inheritance

Implements

Inherited Members

Constructors

OverlayManagerImage(SKBitmap, int, int, double, OverlayManagerImageStretchMode)

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

public OverlayManagerImage(SKBitmap image, int x, int y, double alpha = 1, OverlayManagerImageStretchMode stretchMode = OverlayManagerImageStretchMode.None)

Parameters

image SKBitmap

The image.

x int

The x.

y int

The y.

alpha double

The alpha.

stretchMode OverlayManagerImageStretchMode

The stretch mode to apply to the image.

OverlayManagerImage(string, int, int, double, OverlayManagerImageStretchMode)

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

public OverlayManagerImage(string filename, int x, int y, double alpha = 1, OverlayManagerImageStretchMode stretchMode = OverlayManagerImageStretchMode.None)

Parameters

filename string

The filename.

x int

The x.

y int

The y.

alpha double

The alpha.

stretchMode OverlayManagerImageStretchMode

The stretch mode to apply to the image.

Fields

Lock

The lock object used for thread-safe operations.

public readonly object Lock

Field Value

object

Properties

Alpha

Gets the alpha.

public double Alpha { get; }

Property Value

double

AnimationEnabled

Gets or sets a value indicating whether position/size animation is enabled. When enabled, the image animates from current position to target position.

public bool AnimationEnabled { get; set; }

Property Value

bool

AnimationEndTime

Gets or sets the animation end time.

public TimeSpan AnimationEndTime { get; set; }

Property Value

TimeSpan

AnimationStartTime

Gets or sets the animation start time.

public TimeSpan AnimationStartTime { get; set; }

Property Value

TimeSpan

Cache

Gets or sets the cache.

public object Cache { get; set; }

Property Value

object

Easing

Gets or sets the easing function for position/size animation.

public OverlayManagerPanEasing Easing { get; set; }

Property Value

OverlayManagerPanEasing

Enabled

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

public bool Enabled { get; set; }

Property Value

bool

EndTime

Gets or sets the end time (optional).

public TimeSpan EndTime { get; set; }

Property Value

TimeSpan

FadeEasing

Gets or sets the easing function for fade animation.

public OverlayManagerPanEasing FadeEasing { get; set; }

Property Value

OverlayManagerPanEasing

FadeEnabled

Gets or sets a value indicating whether fade animation is enabled.

public bool FadeEnabled { get; set; }

Property Value

bool

FadeEndTime

Gets or sets the fade end time.

public TimeSpan FadeEndTime { get; set; }

Property Value

TimeSpan

FadeStartTime

Gets or sets the fade start time.

public TimeSpan FadeStartTime { get; set; }

Property Value

TimeSpan

FadeType

Gets or sets the fade type (FadeIn or FadeOut).

public OverlayManagerFadeType FadeType { get; set; }

Property Value

OverlayManagerFadeType

Height

Gets or sets the height.

public int Height { get; set; }

Property Value

int

Name

Gets or sets the name.

public string Name { get; set; }

Property Value

string

Opacity

Gets or sets the opacity (0.0 to 1.0).

public double Opacity { get; set; }

Property Value

double

Rotation

Gets or sets the rotation angle in degrees (0-360).

public double Rotation { get; set; }

Property Value

double

Shadow

Gets or sets the shadow settings.

public OverlayManagerShadowSettings Shadow { get; set; }

Property Value

OverlayManagerShadowSettings

StartTime

Gets or sets the start time (optional).

public TimeSpan StartTime { get; set; }

Property Value

TimeSpan

StretchMode

Gets or sets the stretch mode.

public OverlayManagerImageStretchMode StretchMode { get; set; }

Property Value

OverlayManagerImageStretchMode

TargetHeight

Gets or sets the animation target height (0 to keep current).

public int TargetHeight { get; set; }

Property Value

int

TargetWidth

Gets or sets the animation target width (0 to keep current).

public int TargetWidth { get; set; }

Property Value

int

TargetX

Gets or sets the animation target X position.

public int TargetX { get; set; }

Property Value

int

TargetY

Gets or sets the animation target Y position.

public int TargetY { get; set; }

Property Value

int

Width

Gets or sets the width.

public int Width { get; set; }

Property Value

int

X

Gets or sets the X coordinate position of the image.

public int X { get; set; }

Property Value

int

Y

Gets or sets the Y coordinate position of the image.

public int Y { get; set; }

Property Value

int

ZIndex

Gets or sets the Z-Index (drawing order). Higher values are drawn on top.

public int ZIndex { get; set; }

Property Value

int

Methods

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

~OverlayManagerImage()

Finalizes an instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerImage class.

protected ~OverlayManagerImage()

GetCurrentOpacity(TimeSpan)

Gets the current opacity based on fade animation progress.

public double GetCurrentOpacity(TimeSpan currentTime)

Parameters

currentTime TimeSpan

The current playback time.

Returns

double

The current opacity (0.0 to 1.0).

GetCurrentRect(TimeSpan)

Gets the current rectangle based on animation progress.

public (int X, int Y, int Width, int Height) GetCurrentRect(TimeSpan currentTime)

Parameters

currentTime TimeSpan

The current playback time.

Returns

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

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

GetImage()

Gets the image.

public SKBitmap GetImage()

Returns

SKBitmap

Bitmap.

StartAnimation(int, int, int, int, TimeSpan, TimeSpan, OverlayManagerPanEasing)

Starts a position/size animation from current values to target values.

public void StartAnimation(int targetX, int targetY, int targetWidth, int targetHeight, TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)

Parameters

targetX int

The target X position.

targetY int

The target Y position.

targetWidth int

The target width (0 to keep current).

targetHeight int

The target height (0 to keep current).

startTime TimeSpan

The animation start time.

duration TimeSpan

The animation duration.

easing OverlayManagerPanEasing

The easing function.

StartFadeIn(TimeSpan, TimeSpan, OverlayManagerPanEasing)

Starts a fade-in animation from the specified time.

public void StartFadeIn(TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)

Parameters

startTime TimeSpan

The fade start time.

duration TimeSpan

The fade duration.

easing OverlayManagerPanEasing

The easing function.

StartFadeOut(TimeSpan, TimeSpan, OverlayManagerPanEasing)

Starts a fade-out animation from the specified time.

public void StartFadeOut(TimeSpan startTime, TimeSpan duration, OverlayManagerPanEasing easing = OverlayManagerPanEasing.Linear)

Parameters

startTime TimeSpan

The fade start time.

duration TimeSpan

The fade duration.

easing OverlayManagerPanEasing

The easing function.

Update(SKBitmap, int, int, double, OverlayManagerImageStretchMode)

Updates the specified image.

public void Update(SKBitmap image, int x, int y, double alpha = 1, OverlayManagerImageStretchMode stretchMode = OverlayManagerImageStretchMode.None)

Parameters

image SKBitmap

The image.

x int

The x.

y int

The y.

alpha double

The alpha.

stretchMode OverlayManagerImageStretchMode

The stretch mode to apply to the image.

Update(string, int, int, double, OverlayManagerImageStretchMode)

Updates the specified filename.

public void Update(string filename, int x, int y, double alpha = 1, OverlayManagerImageStretchMode stretchMode = OverlayManagerImageStretchMode.None)

Parameters

filename string

The filename.

x int

The x.

y int

The y.

alpha double

The alpha.

stretchMode OverlayManagerImageStretchMode

The stretch mode to apply to the image.

See Also