Table of Contents

Class EdgeContinuousPulseAnimation

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

Continuous thickness pulse animation that loops indefinitely.

public class EdgeContinuousPulseAnimation : IAnimation
Inheritance
EdgeContinuousPulseAnimation
Implements
Inherited Members

Constructors

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

Creates a new continuous pulse animation.

public EdgeContinuousPulseAnimation(Edge edge, double minThickness = 1.5, double maxThickness = 4, double frequency = 1.5, Action<Edge, double>? onUpdate = null, double? maxDuration = null)

Parameters

edge Edge

The edge to animate.

minThickness double

Minimum stroke thickness.

maxThickness double

Maximum stroke thickness.

frequency double

Pulse frequency in Hz.

onUpdate Action<Edge, double>

Callback called each frame with the edge and current thickness.

maxDuration double?

Maximum duration in seconds, or null for infinite.

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.