getSvgPathFromStrokePoints

See source code

Turn an array of stroke points into a path of quadratic curves.

The path uses relative commands with coordinates rounded to hundredths of a pixel, which renders identically to the absolute 4-decimal form but is much smaller and faster to build.

function getSvgPathFromStrokePoints(
  points: StrokePoint[],
  closed?: boolean,
): string;

Parameters

NameDescription

points

The stroke points returned from perfect-freehand

closed

boolean;

Whether the shape is closed

Returns

string;
Prev
getStrokePoints
Next
getUncroppedSize