API > @blocksuite/blocks > getStroke
Function: getStroke ​
getStroke(
points
,options
=...
):number
[][]
getStroke ​
Parameters ​
Parameter | Type | Description |
---|---|---|
points | (number [] | {pressure : number ; x : number ; y : number ;})[] | An array of points (as [x, y, pressure] or {x, y, pressure} ). Pressure is optional in both cases. |
options | StrokeOptions | (optional) An object with options. |
Returns ​
number
[][]
Description ​
Get an array of points describing a polygon that surrounds the input points.
Defined In ​
packages/blocks/src/surface-block/perfect-freehand/getStroke.ts:20