FANDOM


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

Draws an empty rectangle shape.

x0
The x coordinate of the upper left corner.
y0
The y coordinate of the upper left corner.
x1
The x coordinate of the lower right corner.
y1
The y coordinate of the lower right corner.
col
The color of the rectangle border. If omitted, the color from the draw state is used.

This draws a rectangle shape parallel to the screen borders.

Examples Edit

rect(16, 16, 112, 112, 1)

-- draw three empty white rectangles at random locations and sizes
color(7)
for x=1,3 do
  rect(rnd(128), rnd(128), rnd(128), rnd(128))
end

See also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.