Skip to main content

hatch

Function hatch 

Source
fn hatch(
    rect: Rect,
    stroke: impl Into<RoleStroke>,
    painter: &mut Style<'_, impl Renderer>,
)
Expand description

45° hatching clipped to rect, as segments — the painter has no fill patterns, so the lines are clipped here rather than by a clip region.

Each line runs down-right from a point t along the top edge; inside the rect it spans u from max(0, -t) to min(h, w - t), which is empty for a t that misses the rect entirely.