Tryst::Vector::Context
Yielded to Surface#draw - the drawing vocabulary for one frame.
Every shape a Context creates gets the Surface's own HiDPI scale applied via tvg_paint_scale before anything else touches it, so coordinates passed to #rect/#rounded_rect/#circle are always logical pixels (matching the Surface's own width/height), never device pixels - a #draw block is written once and looks right at any scale.
Constructors
Instance methods
A stroked circular arc - the one primitive here with no fill concept, since a partial ring only makes sense as an outline (a filled version would be a pie slice; #polygon can already build that shape directly if something needs it later). Internally sets a fully transparent fill regardless of what a caller does afterward, since ThorVG has no "unset" fill state - only ever a color - and this shape's own path is deliberately never closed, so an opaque default fill would render as a solid pie slice behind the stroke.
start_deg/sweep_deg: 0 degrees is 12 o'clock, positive sweeps clockwise (screen coordinates - y grows downward) - the convention a progress ring or spinner is actually thought about in, not math's usual 0=east/counterclockwise. A negative sweep_deg sweeps counterclockwise from start_deg.
ThorVG has no native arc path command (see bindings/core.cr's own comment on tvg_shape_cubic_to), so this builds one as a sequence of cubic Bezier segments, each capped at 90 degrees - the standard circular-arc-as-Bezier construction, accurate to a small fraction of a pixel at any spinner/progress-ring radius this project draws at.
An arbitrary closed straight-edged shape from its own vertices - e.g. a tooltip's pointer arrow, which none of #rect/#rounded_rect/ #circle can produce. Needs at least 3 points; raises otherwise rather than handing ThorVG a degenerate path.