Skip to main content

linear_gradient_decomposes

Function linear_gradient_decomposes 

Source
pub fn linear_gradient_decomposes(
    prim_rect: &LayoutRect,
    tile_size: LayoutSize,
    tile_spacing: LayoutSize,
    start: LayoutPoint,
    end: LayoutPoint,
    extend_mode: ExtendMode,
    stops: &[GradientStop],
    enable_dithering: bool,
) -> bool
Expand description

Whether a linear gradient is eligible for the fast-path two-stop-per-segment decomposition at prepare time. Inputs are the values produced by optimize_linear_gradient (i.e. already simplified and clip-adjusted).