Skip to main content

Module gradient

Module gradient 

Source
Expand description

Ported from Arc (MIT) © 2026 Elia Kuratli Gradients (linear via GPUI, radial/conic via PathBuilder tessellation) and mask-image edge-fade quad overlays (used by scrollable TabsList, ScrollArea, etc.).

Structs§

ConicGradientSpec
Conic gradient painted with angular wedges via GPUI PathBuilder.
EdgeFadeMask
Emulates CSS mask-image: linear-gradient(...) edge fades by painting a gradient quad from the container’s background color to transparent on the requested edge.
GradientStop
Color stop (position in 0.0..=1.0, color).
RadialGradientSpec
Radial gradient painted with concentric polygon rings via GPUI PathBuilder.

Enums§

EdgeFadeSide
Which side an edge fade mask overlays.

Functions§

paint_conic_gradient
paint_radial_gradient
sample_stops
Samples a multi-stop gradient at t in 0.0..=1.0.