Skip to main content

makePie()

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

Part of the @remotion/shapes package.

Generates a piece of pie SVG path.

Example

pie.ts
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'
pie.ts
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

Return type

See also