Classes | |
| struct | KnobStyle |
| struct | FaderStyle |
| struct | RangeSliderStyle |
| struct | ToggleStyle |
| struct | WaveformStyle |
Functions | |
| void | paint_mod_ring_knob (canvas::Canvas &canvas, const Rect &rect, float value, const KnobStyle &style={}) |
| Draw a rotary knob whose active ring sweeps from start_angle_deg by value * sweep_deg, with a pointer line at the value angle. | |
| void | paint_level_fader (canvas::Canvas &canvas, const Rect &rect, float value, const FaderStyle &style={}) |
| Draw a linear fader with a filled level bar and a thumb at value [0,1]. | |
| void | paint_range_slider (canvas::Canvas &canvas, const Rect &rect, float lo, float hi, const RangeSliderStyle &style={}) |
| Draw a two-thumb range slider spanning [lo, hi] (each [0,1], clamped, and lo <= hi enforced). | |
| void | paint_toggle (canvas::Canvas &canvas, const Rect &rect, bool on, const ToggleStyle &style={}) |
| Draw a pill toggle. | |
| void | paint_waveform (canvas::Canvas &canvas, const Rect &rect, const float *samples, std::size_t count, const WaveformStyle &style={}) |
| Draw count samples (each ~[-1,1]) as a polyline filling rect horizontally, centered vertically (sample +1 = top, -1 = bottom). | |
| void pulp::view::painters::paint_level_fader | ( | canvas::Canvas & | canvas, |
| const Rect & | rect, | ||
| float | value, | ||
| const FaderStyle & | style = {} ) |
Draw a linear fader with a filled level bar and a thumb at value [0,1].
Vertical: value 0 = bottom, 1 = top; horizontal: 0 = left, 1 = right. The thumb rect (LAST fill_rounded_rect) tracks value along the travel axis.
| void pulp::view::painters::paint_mod_ring_knob | ( | canvas::Canvas & | canvas, |
| const Rect & | rect, | ||
| float | value, | ||
| const KnobStyle & | style = {} ) |
Draw a rotary knob whose active ring sweeps from start_angle_deg by value * sweep_deg, with a pointer line at the value angle.
value is [0,1] (clamped). Emits: the full track arc, the active value arc (LAST stroke_arc — its sweep scales with value), and the indicator line.
| void pulp::view::painters::paint_range_slider | ( | canvas::Canvas & | canvas, |
| const Rect & | rect, | ||
| float | lo, | ||
| float | hi, | ||
| const RangeSliderStyle & | style = {} ) |
Draw a two-thumb range slider spanning [lo, hi] (each [0,1], clamped, and lo <= hi enforced).
Emits the track, a fill between the two thumb positions, and two thumb circles (first = lo, second = hi).
| void pulp::view::painters::paint_toggle | ( | canvas::Canvas & | canvas, |
| const Rect & | rect, | ||
| bool | on, | ||
| const ToggleStyle & | style = {} ) |
Draw a pill toggle.
The knob (LAST fill_circle) sits at the left for off, the right for on; the track uses the on/off color.
| void pulp::view::painters::paint_waveform | ( | canvas::Canvas & | canvas, |
| const Rect & | rect, | ||
| const float * | samples, | ||
| std::size_t | count, | ||
| const WaveformStyle & | style = {} ) |
Draw count samples (each ~[-1,1]) as a polyline filling rect horizontally, centered vertically (sample +1 = top, -1 = bottom).
Draws an optional center baseline. No-op if count < 2 or samples is null.