Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
constexpr float kChartGlowSigmaMax
Largest accepted glow_sigma.
Definition chart_shader_presets.hpp:35
const std::vector< std::string > & chart_shader_preset_names()
The preset names: bevel, inset-channel, tube, light-pipe, centre-highlight and glow.
bool parse_chart_profile(std::string_view name, ChartProfile &out)
Parse a profile name (round, flat, chamfer).
ChartProfile
Cross-section of a tube or light pipe across its band.
Definition chart_shader_presets.hpp:27
@ flat
a flat face with a narrow rounded rim at each edge
Definition chart_shader_presets.hpp:29
@ chamfer
a flat centre with 45 degree chamfers on the outer 40%
Definition chart_shader_presets.hpp:30
@ round
a cylinder: the normal turns smoothly from edge to edge
Definition chart_shader_presets.hpp:28
ChartShaderPreset make_chart_shader_preset(std::string_view name, const ChartShaderPresetOptions &options={})
Build the named preset's chart shader with options baked in as constants.
float chart_glow_reach(float sigma, float intensity)
Distance past which a glow of sigma and intensity is below one 8-bit step (intensity * exp(-r^2 / (2 ...
static constexpr Color rgba8(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Construct from 8-bit channels [0,255] — convenience for legacy/hex code.
Definition canvas.hpp:61
Definition chart_shader_presets.hpp:37
float light_elevation_deg
Height of the light above the surface, 0 (grazing) to 90 (overhead).
Definition chart_shader_presets.hpp:50
canvas::Color accent
Emissive colour (sRGB) for light-pipe, glow and the highlight of centre-highlight.
Definition chart_shader_presets.hpp:43
float bevel_width
Fraction of the half width the bevel or channel wall occupies, (0, 1].
Definition chart_shader_presets.hpp:57
float glow_sigma
glow: Gaussian falloff outside the band, in local units, from 0 to kChartGlowSigmaMax.
Definition chart_shader_presets.hpp:62
ChartProfile profile
Cross-section for tube and light-pipe.
Definition chart_shader_presets.hpp:55
float intensity
Strength of the highlight, specular or glow, >= 0. Zero removes it.
Definition chart_shader_presets.hpp:59
canvas::Color color
Material colour (sRGB) for bevel, inset-channel, tube and the base of centre-highlight.
Definition chart_shader_presets.hpp:40
bool pressed
bevel only: a pressed bevel sinks instead of rising, which reverses which edge catches the light.
Definition chart_shader_presets.hpp:53
float light_angle_deg
Direction the light comes from, in screen degrees counter-clockwise from the right: 90 is from above,...
Definition chart_shader_presets.hpp:48
Definition chart_shader_presets.hpp:65
std::string sksl
SkSL defining half4 shade(PulpChart g); empty when refused.
Definition chart_shader_presets.hpp:67
float reach
Draw-rect reach the preset needs on every side: for glow, whose light lives outside the band,...
Definition chart_shader_presets.hpp:71
std::string error
Why the request was refused; empty on success.
Definition chart_shader_presets.hpp:73