Legacy:Line
From Spherical
Draws a line to screen at location x1, y1, to location x2, y2 with a certain color.
Contents
Usage
Line(x1, y1, x2, y2, color);
- x1 the X coordinate, start of line
- y1 the Y coordinate, start of line
- x2 the X coordinate, end of line
- y2 the Y coordinate, end of line
- color a color object created with CreateColor
Notes
Remember that FlipScreen must be called before any drawing is visible on the screen.
Examples
A red diagonal line.
var Red = CreateColor(255, 0, 0);
Line(0, 0, GetScreenWidth(), GetScreenHeight(), Red);
See also
- Sphere Color Object
- CreateColor(r, g, b, a)
- Rectangle(x, x, width, height, color)
- Point(x, y, color)
- FlipScreen()