PitchKit
API Reference@pitchkit/coreFunctions

annularSectorPath()

function annularSectorPath(
   cx, 
   cy, 
   r0, 
   r1, 
   __namedParameters, 
   inset?
): string;

Defined in: packages/core/src/polar/wedge.ts:48

The SVG path of the slice between radii r0 and r1 and angles start..end: a pizza slice with the hole cut out of its point.

inset pulls each straight edge in by that many pixels (one number for both edges, or [start, end]). The edge stays parallel to its axis, so neighbouring slices are separated by a gap of constant width instead of one that widens towards the rim.

Parameters

ParameterTypeDefault value
cxnumberundefined
cynumberundefined
r0numberundefined
r1numberundefined
__namedParametersWedgeundefined
insetnumber | readonly [number, number]0

Returns

string

On this page