Skip to main content

rect

Function rect 

Source
pub fn rect(x: i32, y: i32, w: u32, h: u32) -> Rect
Expand description

Creates a rectangle from its position and size.

§Arguments

  • x - The left edge in pixels.
  • y - The top edge in pixels.
  • w - The width in pixels.
  • h - The height in pixels.

§Returns

The rectangle.