Table of Contents

Class StretchVideoEffect

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

Represents a stretch distortion effect that creates non-linear scaling and warping of the video image.

public class StretchVideoEffect : BaseVideoEffect, IBaseVideoEffect

Inheritance

Implements

Inherited Members

Remarks

SDK Availability: VideoCaptureCoreX, MediaPlayerCoreX, Media Blocks SDK

Platforms: Windows, Linux, macOS, Android, iOS

This effect applies non-uniform stretching and squeezing distortions to the video, creating elastic, deformable visuals. Unlike simple scaling which maintains aspect ratio or scales uniformly, the stretch effect creates dynamic, organic distortions that can range from subtle warping to extreme deformation.

The stretch effect is controlled by a single VisioForge.Core.Types.X.VideoEffects.StretchVideoEffect.Intensity parameter that determines the strength of the distortion. The effect creates smooth, flowing deformations that give the impression of the video being pulled, stretched, or squeezed like a rubber surface.

The stretch effect is commonly used for:

  • Artistic Expression: Create surreal, elastic visual effects
  • Music Videos: Dynamic, rhythm-synchronized distortions
  • Transitions: Smooth, organic scene transitions
  • Comedy/Cartoon Effects: Exaggerated stretching for comedic impact
  • Abstract Visuals: Non-realistic, dream-like imagery

The VisioForge.Core.Types.X.VideoEffects.StretchVideoEffect.Intensity property can be updated dynamically during playback to create animated stretch effects. The effect automatically triggers updates when the intensity changes.

This is a cross-platform effect with real-time distortion rendering. The effect is GPU-accelerated where available for smooth, performant stretching even at high resolutions.

Performance: Real-time capable on modern hardware. GPU-accelerated elastic distortion. The effect uses dynamic property updates for smooth animation.

Constructors

StretchVideoEffect(double, string)

Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.StretchVideoEffect class with specified intensity and name.

public StretchVideoEffect(double intensity = 0.5, string name = "stretch")

Parameters

intensity double

The distortion intensity. Default is 0.5. Common values:

  • 0.0-0.3: Subtle, gentle stretching
  • 0.4-0.6: Moderate distortion (default range)
  • 0.7-0.9: Strong, dramatic stretching
  • 0.9-1.0: Extreme deformation
name string

The unique name for this effect instance. Defaults to "stretch".

Remarks

The intensity parameter controls the strength of the elastic distortion. Higher values create more pronounced stretching and warping. The effect is designed for real-time animation, so the intensity can be changed during playback.

Fields

DefaultName

The default name for stretch effects.

public static string DefaultName

Field Value

string

Properties

Intensity

Gets or sets the intensity of the stretch distortion.

public double Intensity { get; set; }

Property Value

double

Remarks

Setting this property automatically triggers an update notification via VisioForge.Core.Types.X.VideoEffects.BaseVideoEffect.OnUpdateCall, allowing for smooth animated transitions between different intensity levels during playback. The effect responds immediately to intensity changes.

Methods

ToString()

Returns a string representation of this stretch effect instance.

public override string ToString()

Returns

string

A string containing the current intensity value.