Skip to content

API > @blocksuite/blocks > getStroke

Function: getStroke ​

getStroke(points, options = ...): number[][]

getStroke ​

Parameters ​

ParameterTypeDescription
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.
optionsStrokeOptions(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