Table of Contents

Class RubberBandUtils

Namespace
DrawnUi.Infrastructure.Helpers
Assembly
DrawnUi.Maui.dll
public static class RubberBandUtils
Inheritance
RubberBandUtils
Inherited Members

Methods

Clamp(Vector2, Vector2, SKRect, float)

public static Vector2 Clamp(Vector2 point, Vector2 dims, SKRect bounds, float coeff = 0.55)

Parameters

point Vector2
dims Vector2
bounds SKRect
coeff float

Returns

Vector2

ClampOnTrack(Vector2, SKRect, float, Vector2?)

track is the bounds of the possible scrolling offset, for example can be like {0, -1000, 0, 0}

public static Vector2 ClampOnTrack(Vector2 point, SKRect track, float coeff = 0.55, Vector2? customDims = null)

Parameters

point Vector2
track SKRect
coeff float
customDims Vector2?

Returns

Vector2

RubberBandClamp(float, float, RangeF, float, float)

onEmpty - how much to simulate scrollable area when its zero

public static float RubberBandClamp(float coord, float dim, RangeF limits, float coeff = 0.275, float onEmpty = 40)

Parameters

coord float
dim float
limits RangeF
coeff float
onEmpty float

Returns

float

RubberBandClamp(float, float, float, float)

public static float RubberBandClamp(float diff, float coeff, float dim, float onEmpty)

Parameters

diff float
coeff float
dim float
onEmpty float

Returns

float