Skip to main content

border

Function border 

Source
pub fn border(p: &mut dyn Painter, size: Size, color: Color, width: u8)
Expand description

Draws a border inside the edges of the surface.

The border is width one-pixel rectangles, each inset one pixel further. A width of 0 draws nothing, and drawing stops early if the border would cover the whole surface.

§Arguments

  • p - The painter, targeting the Widget.
  • size - The size of the surface (the Widget’s size).
  • color - The border color.
  • width - The border width in pixels.