Skip to main content

linear_gradient_stops

Function linear_gradient_stops 

Source
pub fn linear_gradient_stops(
    stops: &[(u64, f64)],
    start: (f64, f64),
    end: (f64, f64),
) -> (Vec<u8>, *const c_void, *const c_void)
Expand description

A LinearGradient built from explicit Gradient.Stops.

Not the same as the colors: spelling next door: that one spaces its colours evenly, this one places each at a location the caller gives. A mask built from stops — which is what both of the tvOS Media Catalog’s hero views use — cannot be expressed as evenly-spaced colours.