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

Colours and geometry for the value layer, taken from the design's own tokens so the ring belongs to the palette that asked for it. More...

#include <designed_control_painter.hpp>

Public Attributes

canvas::Color track {0.25f, 0.28f, 0.32f, 1.0f}
 the inactive arc / track
canvas::Color accent {0.08f, 0.72f, 0.65f, 1.0f}
 the value arc / fill
canvas::Color indicator {0.92f, 0.94f, 0.96f, 1.0f}
 the pointer / thumb
bool indicator_authored = false
 True only when this control supplied its own indicator colour.
float ring_width = 4.0f
float indicator_width = 2.5f
float ring_radius_scale = 0.46f
 Ring radius as a fraction of the shorter side of the control box.
float indicator_inner_scale = 0.0f
 Where the POINTER starts and ends, as fractions of the shorter side.
float indicator_outer_scale = 0.0f
bool draw_ring = true
 Which rotary value layers the DESIGN authorized.
bool draw_indicator = true

Detailed Description

Colours and geometry for the value layer, taken from the design's own tokens so the ring belongs to the palette that asked for it.

Member Data Documentation

◆ accent

canvas::Color pulp::view::DesignedControlSkin::accent {0.08f, 0.72f, 0.65f, 1.0f}

the value arc / fill

◆ draw_indicator

bool pulp::view::DesignedControlSkin::draw_indicator = true

◆ draw_ring

bool pulp::view::DesignedControlSkin::draw_ring = true

Which rotary value layers the DESIGN authorized.

The skin exists because the design owns the body; these say the design owns the value layer too. A design that drew no ring gets no ring — synthesizing one puts arcs in the render that the design's own capture does not show, in colours the author never placed there. draw_ring is set only when the design declared where a value ring belongs (design_ring_radius); draw_indicator when it authored a pointer (knob_ind_*) or declared that ring. Both clear: paint_rotary still returns true — suppressing the stock body is the skin's whole point — but contributes no pixels, so the authored body beneath is the entire appearance, exactly as captured.

Defaults stay true so a standalone caller keeps the full arc gauge. Rotary-only: paint_linear ignores them.

◆ indicator

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

the pointer / thumb

◆ indicator_authored

bool pulp::view::DesignedControlSkin::indicator_authored = false

True only when this control supplied its own indicator colour.

Without provenance, indicator is merely a fallback and the design theme's control.thumb token must retain precedence.

◆ indicator_inner_scale

float pulp::view::DesignedControlSkin::indicator_inner_scale = 0.0f

Where the POINTER starts and ends, as fractions of the shorter side.

The ring was given a design-derived radius so it would stop crossing the body; the pointer was left running from the box CENTRE, so it kept doing exactly what the ring had stopped doing — a full-radius spoke over the design's own cap. Both ends are derived from real edges in apply_designed_body_skin: the body edge, and the ring's outer edge.

Zero on either keeps the stock behaviour (centre, and the ring radius), so a caller with no box to measure is unaffected.

◆ indicator_outer_scale

float pulp::view::DesignedControlSkin::indicator_outer_scale = 0.0f

◆ indicator_width

float pulp::view::DesignedControlSkin::indicator_width = 2.5f

◆ ring_radius_scale

float pulp::view::DesignedControlSkin::ring_radius_scale = 0.46f

Ring radius as a fraction of the shorter side of the control box.

The control box IS the design's body box, so a value at or below 0.5 paints the ring ON the body — which is what "the design owns the body" forbids. Callers derive this from the body edge (see apply_designed_body_skin) so the ring rides just OUTSIDE the dial, in the gap a decorative bezel or tick ring already occupies.

The 0.46 here is only the struct's own default, for a caller that has no box to measure. It is deliberately not the value the import lane uses.

◆ ring_width

float pulp::view::DesignedControlSkin::ring_width = 4.0f

◆ track

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

the inactive arc / track


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