Table of Contents

Class EdgeRainbowAnimation

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

Cycles through rainbow colors continuously for a colorful effect.

public class EdgeRainbowAnimation : IAnimation
Inheritance
EdgeRainbowAnimation
Implements
Inherited Members

Constructors

EdgeRainbowAnimation(Edge, double, Action<Edge, Color>?, double?)

Creates a new rainbow color animation.

public EdgeRainbowAnimation(Edge edge, double cycleSpeed = 0.5, Action<Edge, Color>? onUpdate = null, double? maxDuration = null)

Parameters

edge Edge

The edge to animate.

cycleSpeed double

How fast to cycle through colors (1.0 = one full cycle per second).

onUpdate Action<Edge, Color>

Callback called each frame with the edge and current color.

maxDuration double?

Maximum duration in seconds, or null for infinite.

Properties

CurrentColor

Gets the current color.

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.