Skip to content

createArcPath

Read as Markdown

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

ArcPathOptions is accepted by createArcPath(options): Path2D, a pure numeric constructor. It accepts finite logical-unit center/radius/sweep options and returns a fresh, open Path2D; it owns no render state, events, or cache.

<Path
style={{
d: createArcPath({ radius: 48, startAngle: 0, endAngle: Math.PI }),
stroke: "#2563eb",
}}
/>

Use a component when geometry needs percentage or allocation resolution.

Creates a Canvas Path2D for arc geometry from validated options.

createArcPath: (options: Readonly<ArcPathOptions>) => Path2D

Related API: createArcPath, ArcPathOptions.

  • options — Circle center, radius, angles, and sweep direction. See ArcPathOptions.

A native Canvas path containing the arc.

ArcPathOptions

View source — packages/core/src/lib/geometry/circular-sweep.ts:77

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.