Skip to main content

resolve_layer_brush

Function resolve_layer_brush 

Source
pub fn resolve_layer_brush(
    brush: &Brush,
    layer: &GraphicsLayer,
) -> ResolvedBrush
Expand description

apply_layer_to_brush without the solid-brush clone: the borrowed brush’s color is copied (or layer-adjusted) inline, and only gradients are cloned. Produces exactly the values apply_layer_to_brush would — both branches below mirror its fast path and its Solid arm verbatim.