# createWedgePath

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

[`WedgePathOptions`](/reference/types/elements-components/#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.

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

See the [Wedge live example](/playground/#/examples/drawing/wedge).

## API details from source

<span id="api-createWedgePath"></span>

Creates a Canvas Path2D for wedge geometry from validated options.

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

Related API: [createWedgePath](/reference/functions/create-wedge-path/), [WedgePathOptions](/reference/types/elements-components/#wedgepathoptions).

### Parameters

- **`options`** — Circle center, radius, angles, and sweep direction. See
[WedgePathOptions](/reference/types/elements-components/#wedgepathoptions) .

### Returns

A native Canvas path containing the closed wedge.

### See also

[WedgePathOptions](/reference/types/elements-components/#wedgepathoptions)

[View source — packages/core/src/lib/geometry/circular-sweep.ts:96](/source/packages/core/src/lib/geometry/circular-sweep-ts/#L96)

## Implementation guidance for agents

Read the [Drawing, layout, and effects companion](/agents/topics/layout/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal examples

- [Circular path factories](/minimal-examples/paths/circular-factories/): Create circle, ellipse, arc, and wedge Path2D shapes. [Plain source](/minimal/paths/circular-factories.ts)
## Documentation version

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