Documentation / @ripl/terminal / isPointOnContours
Function: isPointOnContours() ​
isPointOnContours(
contours,x,y,width,closed?):boolean
Defined in: terminal/src/hit.ts:80
Tests whether a point falls within width of any edge of the given contours.
Parameters ​
| Parameter | Type | Default value | Description |
|---|---|---|---|
contours | Vertex[][] | undefined | The contours to test against. |
x | number | undefined | X coordinate of the point. |
y | number | undefined | Y coordinate of the point. |
width | number | undefined | The stroke width the contours would be drawn with. |
closed | boolean | true | Whether each contour's last point joins back to its first. |
Returns ​
boolean
true when the point is on the stroke.