Skip to main content

paint_bevel

Function paint_bevel 

Source
pub fn paint_bevel(
    painter: &Painter,
    rect: Rect,
    bevel: Bevel,
    palette: &Palette,
    stroke: f32,
)
Expand description

Paint a two-tone edge just inside rect.

Fill first, bevel after: this adds two polylines and nothing else, so it composes over whatever is already there. That is what lets it go over an egui::TextEdit after ui.add, where the widget’s own fill has landed.

Two three-point polylines meeting at opposite corners, rather than four segments, so egui mitres the corner joins instead of leaving a notch.