DrawBox

Family: Core · One form

What it does

DrawBox makes something happen at once: it draws. It takes x (a float), y (a float), x2 (a float), y2 (a float), color1 (an integer), color2 (an integer), color3 (an integer), color4 (an integer) and filled (an integer), and returns nothing.

Syntax

DrawBox(x float, y float, x2 float, y2 float, color1 integer, color2 integer, color3 integer, color4 integer, filled integer)

Parameters

NameType
xfloat
yfloat
x2float
y2float
color1integer
color2integer
color3integer
color4integer
filledinteger

Every form returns

nothing

Example · generated

DrawBox(100.0, 120.0, 1.0, 1.0, 1, 1, 1, 1, 1)DO  Sync()LOOP

DrawBox is called with values of the types its signature asks for. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

Related commands

200 commands in Core