UNPKG

551 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isPointInStroke = void 0;
4var get_properties_at_point_1 = require("./get-properties-at-point");
5/**
6 * Checks if a given point is in the stroke of a path.
7 */
8function isPointInStroke(pathInput, point) {
9 var distance = (0, get_properties_at_point_1.getPropertiesAtPoint)(pathInput, point).distance;
10 return Math.abs(distance) < 0.001; // 0.01 might be more permissive
11}
12exports.isPointInStroke = isPointInStroke;
13//# sourceMappingURL=is-point-in-stroke.js.map
\No newline at end of file