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
. If only x
is specified, it is considered to be an object in the form { x: [number], y: [number], width: [number], height: [number] }
in which case a copy of the rectangle is returned.