rect function

Rectangle rect(
  1. int x,
  2. int y,
  3. int width,
  4. int height,
)

Creates a rectangle from origin (x, y) and size (width, height).

Implementation

Rectangle rect(int x, int y, int width, int height) =>
    Rectangle(minX: x, minY: y, maxX: x + width, maxY: y + height);