Class AnnularSector<O>
Type Parameters
- O extends AnnularSectorOpts = AnnularSectorOpts
Hierarchy
- Shape<O>
- AnnularSector (View Summary)
Accessors
bottom
center
left
right
svgRoot
- get svgRoot(): SVGSVGElement | null
Nearest enclosing
<svg>root, ornullif this shape isn't mounted under one. Used by drag helpers that need world-space cursor coords.Returns SVGSVGElement | null
top
Constructors
constructor
- new AnnularSector<O extends AnnularSectorOpts = AnnularSectorOpts>(
center: Vec,
rOuter: Val<number>,
rInner: Val<number>,
a0: Val<number>,
a1: Val<number>,
opts?: O,
): AnnularSector<O>
Methods
add
at
attr
Bind one SVG attribute; static sets once, reactive runs as effect.
Parameters
- name: string
- val: Val<string | number>
- target: "intrinsic" | "wrapper" = "intrinsic"
Returns void
attrs
Bind several attributes at once —
this.attrs({ cx, cy, r }).Parameters
- map: Record<string, Val<string | number>>
- target: "intrinsic" | "wrapper" = "intrinsic"
Returns void
boundary
clear
Returns void
dispose
Returns void
effect
Reactive effect torn down with the shape.
Parameters
- fn: () => void
Returns void
on
Parameters
- name: string
- handler: (e: Event) => void
Optionalopts: AddEventListenerOptions
Returns () => void
remove
Parameters
- ...toRemove: AnyShape[]
Returns void
segments
Local-frame segments, derived from the Box (center = the given center).
Returns Segment[]
stroke
- stroke(
opts: CommonOpts,
closed: boolean,
nativeAttrs?: Record<string, Val<string | number>>,
): voidWire stroke / fill / dashed for a stroked shape.
nativeAttrsbinds the shape's native geometry (e.g.{cx, cy, r}for circle); it's skipped whenopts.dashedsince the intrinsic is then a<path>whosedis driven bysegments().Parameters
- opts: CommonOpts
- closed: boolean
OptionalnativeAttrs: Record<string, Val<string | number>>
Returns void
toLocal
Map client coords into this shape's local frame.
Parameters
- evt: { clientX: number; clientY: number }
Returns V
toWorld
Map client coords into the SVG root's frame; stable under rotation (unlike
toLocal). Returns(0, 0)when detached.Parameters
- evt: { clientX: number; clientY: number }
Returns V
track
Register a disposer to run on
dispose().Parameters
- dispose: () => void
Returns void
until
Properties
Readonlya0
Readonlya1
Readonlyaside
Readonlybox
Local-frame box; reach into .x, .center, .at(u,v), etc.
Readonlyel
Optional Readonlyintrinsic
ReadonlylocalFrame
Composed local-frame matrix: T(t) T(p) R(r) S(s) T(-p).
Readonlyopacity
Readonlyorigin
parent
Back-link set by add(); cleared by dispose(). Non-reactive.
Pie wedge with a hole — between two radii swept across two angles.