Class EdgeColorAnimation
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
edgeEdgeThe edge to animate.
startColorColorStarting color.
endColorColorEnding color.
durationdoubleAnimation duration in seconds.
easingFunc<double, double>Easing function (defaults to EaseOutCubic).
onUpdateAction<Edge, Color>Callback called each frame with the edge and current color.
onCompleteActionCallback 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
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
deltaTimedoubleTime elapsed since last update in seconds.