Table of Contents

Class ClickGestureMath

Pure click/tap gesture math shared by click-to-open and click-to-zoom controllers: DPI-scaled slop radius and the within-slop test.

public static class ClickGestureMath
Inheritance
object
ClickGestureMath

Methods

SlopPx(double, double)

Scales a base slop distance (defined at 160 dpi) to the device's actual dpi. A non-positive dpi (dpi unknown) leaves the base value unscaled.

public static double SlopPx(double baseSlopPx, double dpi)

Parameters

baseSlopPx double
dpi double

Returns

double

WithinSlop(double, double, double)

True when a press-to-release delta stayed within the slop radius, i.e. it reads as a click rather than a drag.

public static bool WithinSlop(double dx, double dy, double slopPx)

Parameters

dx double
dy double
slopPx double

Returns

bool