Class OverlayManagerImage
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Overlay Manager image. Implements the IDisposable.
public class OverlayManagerImage : IOverlayManagerElement, IDisposableInheritance
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
imageSKBitmap-
The image.
xint-
The x.
yint-
The y.
alphadouble-
The alpha.
stretchModeOverlayManagerImageStretchMode-
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
filenamestring-
The filename.
xint-
The x.
yint-
The y.
alphadouble-
The alpha.
stretchModeOverlayManagerImageStretchMode-
The stretch mode to apply to the image.
Fields
Lock
The lock object used for thread-safe operations.
public readonly object LockField Value
Properties
Alpha
Gets the alpha.
public double Alpha { get; }Property Value
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
AnimationEndTime
Gets or sets the animation end time.
public TimeSpan AnimationEndTime { get; set; }Property Value
AnimationStartTime
Gets or sets the animation start time.
public TimeSpan AnimationStartTime { get; set; }Property Value
Cache
Gets or sets the cache.
public object Cache { get; set; }Property Value
Easing
Gets or sets the easing function for position/size animation.
public OverlayManagerPanEasing Easing { get; set; }Property Value
Enabled
Gets or sets a value indicating whether this VisioForge.Core.Types.X.VideoEffects.IOverlayManagerElement is enabled.
public bool Enabled { get; set; }Property Value
EndTime
Gets or sets the end time (optional).
public TimeSpan EndTime { get; set; }Property Value
FadeEasing
Gets or sets the easing function for fade animation.
public OverlayManagerPanEasing FadeEasing { get; set; }Property Value
FadeEnabled
Gets or sets a value indicating whether fade animation is enabled.
public bool FadeEnabled { get; set; }Property Value
FadeEndTime
Gets or sets the fade end time.
public TimeSpan FadeEndTime { get; set; }Property Value
FadeStartTime
Gets or sets the fade start time.
public TimeSpan FadeStartTime { get; set; }Property Value
FadeType
Gets or sets the fade type (FadeIn or FadeOut).
public OverlayManagerFadeType FadeType { get; set; }Property Value
Height
Gets or sets the height.
public int Height { get; set; }Property Value
Name
Gets or sets the name.
public string Name { get; set; }Property Value
Opacity
Gets or sets the opacity (0.0 to 1.0).
public double Opacity { get; set; }Property Value
Rotation
Gets or sets the rotation angle in degrees (0-360).
public double Rotation { get; set; }Property Value
Shadow
Gets or sets the shadow settings.
public OverlayManagerShadowSettings Shadow { get; set; }Property Value
StartTime
Gets or sets the start time (optional).
public TimeSpan StartTime { get; set; }Property Value
StretchMode
Gets or sets the stretch mode.
public OverlayManagerImageStretchMode StretchMode { get; set; }Property Value
TargetHeight
Gets or sets the animation target height (0 to keep current).
public int TargetHeight { get; set; }Property Value
TargetWidth
Gets or sets the animation target width (0 to keep current).
public int TargetWidth { get; set; }Property Value
TargetX
Gets or sets the animation target X position.
public int TargetX { get; set; }Property Value
TargetY
Gets or sets the animation target Y position.
public int TargetY { get; set; }Property Value
Width
Gets or sets the width.
public int Width { get; set; }Property Value
X
Gets or sets the X coordinate position of the image.
public int X { get; set; }Property Value
Y
Gets or sets the Y coordinate position of the image.
public int Y { get; set; }Property Value
ZIndex
Gets or sets the Z-Index (drawing order). Higher values are drawn on top.
public int ZIndex { get; set; }Property Value
Methods
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto 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
currentTimeTimeSpan-
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
currentTimeTimeSpan-
The current playback time.
Returns
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
targetXint-
The target X position.
targetYint-
The target Y position.
targetWidthint-
The target width (0 to keep current).
targetHeightint-
The target height (0 to keep current).
startTimeTimeSpan-
The animation start time.
durationTimeSpan-
The animation duration.
easingOverlayManagerPanEasing-
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
startTimeTimeSpan-
The fade start time.
durationTimeSpan-
The fade duration.
easingOverlayManagerPanEasing-
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
startTimeTimeSpan-
The fade start time.
durationTimeSpan-
The fade duration.
easingOverlayManagerPanEasing-
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
imageSKBitmap-
The image.
xint-
The x.
yint-
The y.
alphadouble-
The alpha.
stretchModeOverlayManagerImageStretchMode-
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
filenamestring-
The filename.
xint-
The x.
yint-
The y.
alphadouble-
The alpha.
stretchModeOverlayManagerImageStretchMode-
The stretch mode to apply to the image.