Table of Contents

Class EdgeColorAnimation

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

Animates an edge's stroke color.

public class EdgeColorAnimation : IAnimation
Inheritance
EdgeColorAnimation
Implements
Inherited Members

Constructors

EdgeColorAnimation(Edge, Color, Color, double, Func<double, double>?, Action<Edge, Color>?, Action?)

Creates a new edge color animation.

public EdgeColorAnimation(Edge edge, Color startColor, Color endColor, double duration = 0.3, Func<double, double>? easing = null, Action<Edge, Color>? onUpdate = null, Action? onComplete = null)

Parameters

edge Edge

The edge to animate.

startColor Color

Starting color.

endColor Color

Ending color.

duration double

Animation duration in seconds.

easing Func<double, double>

Easing function (defaults to EaseOutCubic).

onUpdate Action<Edge, Color>

Callback called each frame with the edge and current color.

onComplete Action

Callback when animation completes.

Properties

CurrentColor

Gets the current color value.

public Color CurrentColor { get; }

Property Value

Color

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.