draw_line

Draws a line one pixel wide.

Syntax:

GML Code Example

draw_line(x1, y1, x2, y2);


Argument Description
x1 The x coordinate of the start of the line.
y1 The y coordinate of the start of the line.
x2 The x coordinate of the end of the line.
y2 The y coordinate of the end of the line.


Returns: N/A


Description

With this function you can draw a 1 pixel wide line between any two points in the game room.


Example:

GML Code Example

draw_set_colour(c_lime);
 draw_line(50,50,150,50);
 

This will draw a light green horizontal line from point (50,50) to point (150,50).





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here