ltk::theme::gradient_lut

Function build_lut_bytes

Source
pub fn build_lut_bytes(stops: &[ColorStop], space: GradientSpace) -> Vec<u8> 
Expand description

Build an RGBA8 LUT of LUT_SAMPLES equally spaced samples spanning LUT_DOMAIN. The returned vector has LUT_SAMPLES * 4 bytes in straight-alpha, row-major. The GPU shader expects this layout and premultiplies at sample time.