g.rect(x, y, width, height)
Return a new rectangle object with top left corner at point with coordinates x
, y
and dimensions width
and height
.
Also accepts as a single argument an object in the form { x: [number], y: [number], width: [number], height: [number] }
.