Skip to content

createWedgePath

Read as Markdown

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

WedgePathOptions is accepted by createWedgePath(options): Path2D, which creates a fresh numeric circular sweep that closes to the center for partial turns. Full turns omit radial segments. It is pure and does not accept percentages or own render state.

<Path
style={{
d: createWedgePath({ radius: 56, startAngle: 0, endAngle: Math.PI / 2 }),
fill: "#f97316",
}}
/>

See the Wedge live example.

Creates a Canvas Path2D for wedge geometry from validated options.

createWedgePath: (options: Readonly<WedgePathOptions>) => Path2D

Related API: createWedgePath, WedgePathOptions.

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

A native Canvas path containing the closed wedge.

WedgePathOptions

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

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 272a94a. ALPHA — NOT FOR PRODUCTION USE.