Class ClickGestureMath
- Namespace
- LansMap.Core.Interaction
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
-
objectClickGestureMath
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
Returns
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)