packages/docs/docs/shapes/make-callout.mdx
import {ShapeOptions, MakeShapeReturnType} from "../../components/shapes/shapes-info"
Part of the @remotion/shapes package.
Generates an SVG path for a callout shape.
import { makeCallout } from "@remotion/shapes";
const { path, width, height, transformOrigin } = makeCallout({
width: 500,
height: 200,
pointerLength: 40,
pointerBaseWidth: 60,
pointerDirection: "down",
cornerRadius: 20,
});
console.log(path);
console.log(width); // 500
console.log(height); // 240
console.log(transformOrigin); // '250 100'
The <code>transformOrigin</code> is the center of the callout body. The pointer is not included in the calculation.