Table of Contents

Class EdgePulseAnimation

Namespace
FlowGraph.Avalonia.Animation
Assembly
FlowGraph.Avalonia.dll

Animates an edge's stroke thickness for pulse/highlight effects.

public class EdgePulseAnimation : IAnimation
Inheritance
EdgePulseAnimation
Implements
Inherited Members

Constructors

EdgePulseAnimation(Edge, double, double, double, double, Action<Edge, double>?, Action?)

Creates a new edge pulse animation.

public EdgePulseAnimation(Edge edge, double baseThickness = 2, double pulseAmount = 2, double frequency = 2, double duration = 1, Action<Edge, double>? onUpdate = null, Action? onComplete = null)

Parameters

edge Edge

The edge to animate.

baseThickness double

Base stroke thickness.

pulseAmount double

Amount to add during pulse (thickness oscillates between base and base+pulseAmount).

frequency double

Pulse frequency in Hz.

duration double

Total animation duration in seconds.

onUpdate Action<Edge, double>

Callback called each frame with the edge and current thickness.

onComplete Action

Callback when animation completes.

Properties

CurrentThickness

Gets the current thickness value.

public double CurrentThickness { get; }

Property Value

double

IsComplete

Gets whether the animation has completed.

public bool IsComplete { get; }

Property Value

bool

Methods

Cancel()

Called when the animation completes or is cancelled.

public void Cancel()

Update(double)

Updates the animation with the elapsed time since the last frame.

public void Update(double deltaTime)

Parameters

deltaTime double

Time elapsed since last update in seconds.