#include <control_painters.hpp>
Public Attributes | |
| canvas::Color | track {0.25f, 0.28f, 0.32f, 1.0f} |
| the full inactive arc | |
| canvas::Color | ring {0.08f, 0.72f, 0.65f, 1.0f} |
| the active value arc | |
| canvas::Color | indicator {0.92f, 0.94f, 0.96f, 1.0f} |
| the pointer line | |
| float | start_angle_deg = 135.0f |
| angle of value 0 (screen coords, y-down, 0=+x, CW+) | |
| float | sweep_deg = 270.0f |
| total travel from value 0 to value 1 | |
| float | ring_width = 4.0f |
| float | indicator_width = 2.5f |
| float | radius_scale = 0.5f |
| arc radius as a fraction of min(w,h) | |
| float | indicator_inner_scale = 0.0f |
| Where the pointer STARTS, as a fraction of min(w,h). | |
| float | indicator_outer_scale = 0.0f |
| Where the pointer ENDS, as a fraction of min(w,h). | |
| bool | draw_track_and_fill = true |
| Which layers to emit. | |
| bool | draw_indicator = true |
| bool pulp::view::painters::KnobStyle::draw_indicator = true |
| bool pulp::view::painters::KnobStyle::draw_track_and_fill = true |
Which layers to emit.
A stock knob draws all three — its box is its own body and the arc gauge IS its appearance. A knob whose appearance was AUTHORED by a design draws only the layers the design put there: a design that drew no value ring must not acquire one from us, so its skin clears draw_track_and_fill; a design that drew no pointer clears draw_indicator too and the painter emits nothing at all.
| canvas::Color pulp::view::painters::KnobStyle::indicator {0.92f, 0.94f, 0.96f, 1.0f} |
the pointer line
| float pulp::view::painters::KnobStyle::indicator_inner_scale = 0.0f |
Where the pointer STARTS, as a fraction of min(w,h).
Zero is the box centre, which is the stock knob's look and the behaviour every existing caller gets.
A knob whose body was drawn by a DESIGN needs a different answer. Its box is the design's body box, so a pointer from the centre is a spoke straight across the art — the same violation of "the design owns the body" that the ring's own radius had, one element over. Such a caller starts the pointer at the body edge and gets a radial TICK instead.
| float pulp::view::painters::KnobStyle::indicator_outer_scale = 0.0f |
Where the pointer ENDS, as a fraction of min(w,h).
Zero means "the ring radius", which is where it has always ended.
| float pulp::view::painters::KnobStyle::indicator_width = 2.5f |
| float pulp::view::painters::KnobStyle::radius_scale = 0.5f |
arc radius as a fraction of min(w,h)
| canvas::Color pulp::view::painters::KnobStyle::ring {0.08f, 0.72f, 0.65f, 1.0f} |
the active value arc
| float pulp::view::painters::KnobStyle::ring_width = 4.0f |
| float pulp::view::painters::KnobStyle::start_angle_deg = 135.0f |
angle of value 0 (screen coords, y-down, 0=+x, CW+)
| float pulp::view::painters::KnobStyle::sweep_deg = 270.0f |
total travel from value 0 to value 1
| canvas::Color pulp::view::painters::KnobStyle::track {0.25f, 0.28f, 0.32f, 1.0f} |
the full inactive arc