Class SquareVideoEffect
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Represents a square perspective mapping effect that creates a zoom-in distortion within a centered rectangular region.
public class SquareVideoEffect : BaseVideoEffect, IBaseVideoEffect, IVideoEditXVideoEffectInheritance
Implements
Inherited Members
Remarks
SDK Availability: VideoCaptureCoreX, MediaPlayerCoreX, VideoEditCoreX, Media Blocks SDK
Platforms: Windows, Linux, macOS, Android, iOS
This effect creates a perspective distortion where a centered rectangular region is zoomed in while the surrounding areas are compressed towards the edges. The result is a "tunnel vision" or "magnifying glass" effect where the center is enlarged and the periphery is squeezed, creating a square-shaped focal point.
The square effect is controlled by three parameters:
- Width & Height: Define the size of the zoomed region (0.0-1.0 relative to frame)
- Zoom: Controls the magnification level in the center region
The square effect is commonly used for:
- Focus Effects: Draw attention to center content
- Tunnel Vision: Simulate focused or stressed perspective
- Artistic Perspective: Create geometric distortion patterns
- Transitions: Zoom-based scene transitions
- Video Games: Simulate focus or targeting effects
This is a cross-platform effect using the square element with parametric perspective mapping.
The effect is GPU-accelerated where available for real-time performance.
Performance: Real-time capable on modern hardware. GPU-accelerated geometric transformation. Performance scales with resolution and zoom level.
Constructors
SquareVideoEffect(string)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.SquareVideoEffect class with specified name.
public SquareVideoEffect(string name = "square")Parameters
namestring-
The unique name for this effect instance. Defaults to "square".
Fields
DefaultName
The default name for square effects.
public static string DefaultNameField Value
Properties
Height
Gets or sets the height of the zoomed square region, relative to the frame height.
public double Height { get; set; }Property Value
Remarks
Height defines the vertical size of the region that receives the zoom magnification. Use different width and height values to create rectangular (non-square) focal regions. Matching width and height creates a perfectly square focus area.
StartTime
Gets or sets the start time for the square effect (VideoEditCoreX only).
public TimeSpan StartTime { get; set; }Property Value
Remarks
This property is only used in VideoEditCoreX for time-based effect control.
StopTime
Gets or sets the stop time for the square effect (VideoEditCoreX only).
public TimeSpan StopTime { get; set; }Property Value
Remarks
This property is only used in VideoEditCoreX for time-based effect control.
Width
Gets or sets the width of the zoomed square region, relative to the frame width.
public double Width { get; set; }Property Value
Remarks
Width defines the horizontal size of the region that receives the zoom magnification. Smaller values create tighter focal points with more edge compression. Larger values create broader zoom areas with less edge distortion. Values above 0.9 reduce the effect's visibility.
Zoom
Gets or sets the zoom/magnification level applied to the center region.
public double Zoom { get; set; }Property Value
Remarks
Zoom controls how much the center region is magnified relative to the edges. Higher zoom values create more dramatic perspective distortion and stronger edge compression. Very high values (5.0+) can create extreme, possibly disorienting effects.
Methods
GenerateDescription()
Generates the description.
public string GenerateDescription()Returns
- string
-
System.String.