Skip to main content

makeCircle()

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

Part of the @remotion/shapes package.

Generates a circle SVG path.

Example

circle.ts
tsx
import { makeCircle } from "@remotion/shapes";
 
const { path, width, height, transformOrigin } = makeCircle({ radius: 50 });
 
console.log(path); // M 0 0 m -50, 0 a 50,50 0 1,0 100,0 50,50 0 1,0 -100,0
console.log(width); // 100
console.log(height); // 100
console.log(transformOrigin); // '50 50'
circle.ts
tsx
import { makeCircle } from "@remotion/shapes";
 
const { path, width, height, transformOrigin } = makeCircle({ radius: 50 });
 
console.log(path); // M 0 0 m -50, 0 a 50,50 0 1,0 100,0 50,50 0 1,0 -100,0
console.log(width); // 100
console.log(height); // 100
console.log(transformOrigin); // '50 50'

Arguments

Return type

See also