Skip to content

createCirclePath

Read as Markdown

import { Circle, Clip, createCirclePath } from "@pibbl/core";

CirclePathOptions is accepted by createCirclePath(options): Path2D, which creates a fresh circle from a nonnegative numeric radius and optional cx/cy. It is pure and owns no render state, events, or cache.

<Clip style={{ d: createCirclePath({ cx: 80, cy: 80, radius: 56 }) }}>
<Circle style={{ cx: 80, cy: 80, radius: 64, fill: "#2563eb" }} />
</Clip>

Numeric path creators do not accept percentages or "auto".

Creates a Canvas Path2D for circle geometry from validated options.

createCirclePath: (options: Readonly<CirclePathOptions>) => Path2D

Related API: createCirclePath, CirclePathOptions.

A native Canvas path containing the circle.

CirclePathOptions

View source — packages/core/src/lib/geometry/circle.ts:25

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 2dccb19. ALPHA — NOT FOR PRODUCTION USE.