Back to Remotion

makePie()

packages/docs/docs/shapes/make-pie.mdx

4.0.457692 B
Original Source

import {MakeShapeSeeAlso, ShapeOptions, MakeShapeReturnType} from "../../components/shapes/shapes-info"

Part of the @remotion/shapes package.

Generates a piece of pie SVG path.

Example

tsx
import { makePie } from "@remotion/shapes";

const { path, width, height, transformOrigin } = makePie({
  radius: 100,
  progress: 0.5,
});

console.log(path); // M 100 0 A 100 100 0 0 1 100 200 L 100 100 z
console.log(width); // 200
console.log(height); // 200
console.log(transformOrigin); // '100 100'

Arguments

<ShapeOptions shape="pie"/>

Return type

<MakeShapeReturnType shape="pie"/>

See also

<MakeShapeSeeAlso shape="pie"/>