Table of Contents

Class VelocitySkiaAnimator

Namespace
DrawnUi.Animate.Animators
Assembly
DrawnUi.Maui.dll

Basically a modified port of Android FlingAnimation

public class VelocitySkiaAnimator : SkiaValueAnimator, ISkiaAnimator, IDisposable
Inheritance
VelocitySkiaAnimator
Implements
Inherited Members
Extension Methods

Constructors

VelocitySkiaAnimator(SkiaControl)

public VelocitySkiaAnimator(SkiaControl parent)

Parameters

parent SkiaControl

Fields

MIN_VISIBLE_CHANGE_ALPHA

public const float MIN_VISIBLE_CHANGE_ALPHA = 0

Field Value

float

MIN_VISIBLE_CHANGE_PIXELS

public const float MIN_VISIBLE_CHANGE_PIXELS = 1

Field Value

float

MIN_VISIBLE_CHANGE_ROTATION_DEGREES

public const float MIN_VISIBLE_CHANGE_ROTATION_DEGREES = 0

Field Value

float

MIN_VISIBLE_CHANGE_SCALE

public const float MIN_VISIBLE_CHANGE_SCALE = 0

Field Value

float

THRESHOLD_MULTIPLIER

public const float THRESHOLD_MULTIPLIER = 0.75

Field Value

float

UNSET

public const float UNSET = 3.4028235E+38

Field Value

float

mFlingForce

protected VelocitySkiaAnimator.DragForce mFlingForce

Field Value

VelocitySkiaAnimator.DragForce

mMassState

protected VelocitySkiaAnimator.MassState mMassState

Field Value

VelocitySkiaAnimator.MassState

Properties

Friction

The bigger the sooner animation will slow down, default is 1.0

public float Friction { get; set; }

Property Value

float

InverseK

public float InverseK { get; set; }

Property Value

float

InvertOnLimits

public bool InvertOnLimits { get; set; }

Property Value

bool

MaxLimit

public float MaxLimit { get; }

Property Value

float

MinLimit

public float MinLimit { get; }

Property Value

float

Preset

public VelocitySkiaAnimator.PresetType Preset { get; set; }

Property Value

VelocitySkiaAnimator.PresetType

RemainingVelocity

This is set after we are done so we will know at OnStop if we have some energy left

public float RemainingVelocity { get; set; }

Property Value

float

Scale

public float Scale { get; set; }

Property Value

float

SnapBouncingIfVelocityLessThan

public float SnapBouncingIfVelocityLessThan { get; set; }

Property Value

float

mMaxOverscrollValue

Must be over 0

public float mMaxOverscrollValue { get; set; }

Property Value

float

mMaxVelocity

public float mMaxVelocity { get; set; }

Property Value

float

mMinOverscrollValue

Must be over 0

public float mMinOverscrollValue { get; set; }

Property Value

float

mMinVelocity

public float mMinVelocity { get; set; }

Property Value

float

mMinVisibleChange

public float mMinVisibleChange { get; set; }

Property Value

float

mVelocity

public float mVelocity { get; set; }

Property Value

float

mVerticalVelocityChange

public float mVerticalVelocityChange { get; set; }

Property Value

float

Methods

ClampOnStart()

protected override void ClampOnStart()

SetFriction(float)

public VelocitySkiaAnimator SetFriction(float value)

Parameters

value float

Returns

VelocitySkiaAnimator

SetVelocity(float)

public VelocitySkiaAnimator SetVelocity(float value)

Parameters

value float

Returns

VelocitySkiaAnimator

Stop()

public override void Stop()

UpdateValue(long, long)

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

protected override bool UpdateValue(long deltaT, long deltaFromStart)

Parameters

deltaT long
deltaFromStart long

Returns

bool