rect(x0,y0,x1,y1,[col])

Overview

rect draws a rectangle with corners at x0,y0 and x1,y1.

For drawing filled rectangles, use rectfill.

Arguments

x0: number

The top left x-coordinate of the rectangle

y0: number

The top left y-coordinate of the rectangle

x1: number

The bottom right x-coordinate of the rectangle

y1: number

The bottom right y-coordinate of the rectangle

[col]: number

The color of the rectangle; defaults to the last used color.