@meta2d/core
Version:
@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .
9 lines • 330 B
JavaScript
export function circle(pen, ctx) {
const path = !ctx ? new Path2D() : ctx;
const { x, y, width, height } = pen.calculative.worldRect;
path.ellipse(x + width / 2, y + height / 2, width / 2, height / 2, 0, 0, Math.PI * 2);
if (path instanceof Path2D) {
return path;
}
}
//# sourceMappingURL=circle.js.map