Legacy:Line

From Spherical
Revision as of 21:09, 4 June 2013 by Apollolux (talk | contribs) (added navbox)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Draws a line to screen at location x1, y1, to location x2, y2 with a certain color.

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

API:Video/navbox