Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::painters::KnobStyle Struct Reference

#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

Member Data Documentation

◆ draw_indicator

bool pulp::view::painters::KnobStyle::draw_indicator = true

◆ draw_track_and_fill

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.

◆ indicator

canvas::Color pulp::view::painters::KnobStyle::indicator {0.92f, 0.94f, 0.96f, 1.0f}

the pointer line

◆ indicator_inner_scale

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.

◆ indicator_outer_scale

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.

◆ indicator_width

float pulp::view::painters::KnobStyle::indicator_width = 2.5f

◆ radius_scale

float pulp::view::painters::KnobStyle::radius_scale = 0.5f

arc radius as a fraction of min(w,h)

◆ ring

canvas::Color pulp::view::painters::KnobStyle::ring {0.08f, 0.72f, 0.65f, 1.0f}

the active value arc

◆ ring_width

float pulp::view::painters::KnobStyle::ring_width = 4.0f

◆ start_angle_deg

float pulp::view::painters::KnobStyle::start_angle_deg = 135.0f

angle of value 0 (screen coords, y-down, 0=+x, CW+)

◆ sweep_deg

float pulp::view::painters::KnobStyle::sweep_deg = 270.0f

total travel from value 0 to value 1

◆ track

canvas::Color pulp::view::painters::KnobStyle::track {0.25f, 0.28f, 0.32f, 1.0f}

the full inactive arc


The documentation for this struct was generated from the following file: