From eaf249e53f0aefd599ae6bb108c5eb11c8d93643 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 7 Sep 2024 11:16:31 -0400 Subject: [PATCH] update README.md fix getOutlinePoints => getStrokeOutlinePoints README.md contained incorrect reference to getOutlinePoints, which is actually exported as getStrokeOutlinePoints. --- packages/perfect-freehand/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/perfect-freehand/README.md b/packages/perfect-freehand/README.md index b805e00..dedb348 100644 --- a/packages/perfect-freehand/README.md +++ b/packages/perfect-freehand/README.md @@ -218,17 +218,17 @@ import samplePoints from "./samplePoints.json' const strokePoints = getStrokePoints(samplePoints) ``` -#### `getOutlinePoints` +#### `getStrokeOutlinePoints` A function that accepts an array of points (formatted as `{ point, pressure, vector, distance, runningLength }`, i.e. the output of `getStrokePoints`) and (optionally) an options object, and returns an array of points (`[x, y]`) defining the outline of a pressure-sensitive stroke. ```js -import { getStrokePoints, getOutlinePoints } from 'perfect-freehand' +import { getStrokePoints, getStrokeOutlinePoints } from 'perfect-freehand' import samplePoints from "./samplePoints.json' const strokePoints = getStrokePoints(samplePoints) -const outlinePoints = getOutlinePoints(strokePoints) +const outlinePoints = getStrokeOutlinePoints(strokePoints) ``` **Note:** Internally, the `getStroke` function passes the result of `getStrokePoints` to `getStrokeOutlinePoints`, just as shown in this example. This means that, in this example, the result of `outlinePoints` will be the same as if the `samplePoints` array had been passed to `getStroke`.