packages/docs/docs/paths/scale-path.mdx
Part of the @remotion/paths package. Available from v3.3.43
Allows you to grow or shrink the size of a path.
import { scalePath } from "@remotion/paths";
const newPath = scalePath("M 0 0 L 100 100", 1, 2); // "M 0 0 L 100 200";
The origin of the transform is the top left corner of the path. To use a different origin, first use translatePath() to move the path to the desired origin, then scale it, and finally move it back to the original origin.
pathstring
A valid SVG Path string.
xScalenumber
The factor of which to scale the path horizontally. 1 will leave the path unchanged.
yScalenumber
The factor of which to scale the path vertically. 1 will leave the path unchanged.