Table of Contents

Class SkiaValueAnimator

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
public class SkiaValueAnimator : AnimatorBase, ISkiaAnimator, IDisposable
Inheritance
SkiaValueAnimator
Implements
Derived
Inherited Members
Extension Methods

Constructors

SkiaValueAnimator(IDrawnBase)

public SkiaValueAnimator(IDrawnBase parent)

Parameters

parent IDrawnBase

Fields

Debug

public static bool Debug

Field Value

bool

FrameTimeInterpolator

protected FrameTimeInterpolator FrameTimeInterpolator

Field Value

FrameTimeInterpolator

Properties

CycleFInished

Animator self finished a cycle, might still repeat

public Action CycleFInished { get; set; }

Property Value

Action

Easing

public Easing Easing { get; set; }

Property Value

Easing

ElapsedMs

public double ElapsedMs { get; protected set; }

Property Value

double

Finished

Animator self finished running without being stopped manually

public Action Finished { get; set; }

Property Value

Action

OnUpdated

public Action<double> OnUpdated { get; set; }

Property Value

Action<double>

Progress

We are using this internally to apply easing. Can be above 1 when finishing. If you need progress 0-1 use ProgressAnimator.

protected double Progress { get; set; }

Property Value

double

Repeat

-1 means forever..

public int Repeat { get; set; }

Property Value

int

Speed

public double Speed { get; set; }

Property Value

double

UseInterpolator

public bool UseInterpolator { get; set; }

Property Value

bool

mMaxValue

public double mMaxValue { get; set; }

Property Value

double

mMinValue

public double mMinValue { get; set; }

Property Value

double

mStartValueIsSet

public bool mStartValueIsSet { get; protected set; }

Property Value

bool

mValue

public double mValue { get; set; }

Property Value

double

Methods

ClampOnStart()

protected virtual void ClampOnStart()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

FinishedRunning()

protected virtual bool FinishedRunning()

Returns

bool

GetNanoseconds()

public static long GetNanoseconds()

Returns

long

OnRunningStateChanged(bool)

protected override void OnRunningStateChanged(bool isRunning)

Parameters

isRunning bool

RunAsync(Action, CancellationToken)

public virtual Task RunAsync(Action initialize, CancellationToken cancellationToken = default)

Parameters

initialize Action
cancellationToken CancellationToken

Returns

Task

Seek(float)

public void Seek(float msTime)

Parameters

msTime float

SetSpeed(double)

public SkiaValueAnimator SetSpeed(double value)

Parameters

value double

Returns

SkiaValueAnimator

SetValue(double)

public SkiaValueAnimator SetValue(double value)

Parameters

value double

Returns

SkiaValueAnimator

Start(double)

public override void Start(double delayMs = 0)

Parameters

delayMs double

Stop()

public override void Stop()

TickFrame(long)

Time in NANOS

public override bool TickFrame(long frameTimeNanos)

Parameters

frameTimeNanos long

Returns

bool

TransformReportedValue(long)

/// Passed over mValue, you can change the reported passed value here

protected virtual double TransformReportedValue(long deltaT)

Parameters

deltaT long

Returns

double

modified mValue for callback consumer

UpdateValue(long, long)

Update mValue using time distance between rendered frames. Return true if anims is finished.

protected virtual bool UpdateValue(long deltaT, long deltaFromStart)

Parameters

deltaT long
deltaFromStart long

Returns

bool