What it does
DrawLine makes something happen at once: it draws. It takes x (a float), y (a float), x2 (a float), y2 (a float), red (an integer), green (an integer) and blue (an integer), and returns nothing. That is the first of 2 forms.
Syntax
1
DrawLine(x float, y float, x2 float, y2 float, red integer, green integer, blue integer)2
DrawLine(x float, y float, x2 float, y2 float, color1 integer, color2 integer)Parameters
| Name | Type | In forms |
|---|---|---|
| x | float | all |
| y | float | all |
| x2 | float | all |
| y2 | float | all |
| red | integer | 1 |
| green | integer | 1 |
| blue | integer | 1 |
| color1 | integer | 2 |
| color2 | integer | 2 |
Every form returns
nothing
Example · generated
Form 1, with every argument
DrawLine(100.0, 120.0, 1.0, 1.0, 255, 128, 128)DO Sync()LOOPForm 2, the short one
DrawLine(100.0, 120.0, 1.0, 1.0, 1, 1)DO Sync()LOOPDrawLine 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.