Skip to main content

content_edge_fade

Function content_edge_fade 

pub fn content_edge_fade(
    scene: &mut Scene,
    transform: Affine,
    rect: Rect,
    edge: ContentEdge,
    ground: AlphaColor<Srgb>,
)
Expand description

Fade content out toward edge of the viewport rect: the ground the content is drawn on, opaque at the edge and clear a short way in, eased so it has no start line. Paint it over the content, and only while more content can scroll in from that edge (a Scrollable with with_edge_fade does both). The replacement for a media scrim, a DestOut mask or a hand-made gradient at the end of a list.