Skip to content

createEllipsePath

Read as Markdown

import { createEllipsePath, Path } from "@pibbl/core";

EllipsePathOptions is accepted by createEllipsePath(options): Path2D, which creates a fresh path from nonnegative numeric radii, optional center, and finite radian rotation. It is pure and has no render lifecycle.

<Path
style={{
d: createEllipsePath({ radiusX: 64, radiusY: 30, rotation: 0.4 }),
fill: "#38bdf8",
}}
/>

See the Ellipse live example.

Creates a Canvas Path2D for ellipse geometry from validated options.

createEllipsePath: (options: Readonly<EllipsePathOptions>) => Path2D

Related API: createEllipsePath, EllipsePathOptions.

A native Canvas path containing the ellipse.

EllipsePathOptions

View source — packages/core/src/lib/geometry/ellipse.ts:29

Read the Drawing, layout, and effects companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision 380919b. ALPHA — NOT FOR PRODUCTION USE.