draw_line_colour

Draws a line one pixel wide with a colour gradient.

Syntax:

GML Code Example

draw_line_colour(x1, y1, x2, y2, col1, col2);


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.
col1 The colour of the start of the line.
col2 The colour of the end of the line.


Returns: N/A


Description

With this function you can draw a 1 pixel wide line with the colour blended between colour 1 at the first point and colour 2 at the second point. The colour settings will over-ride the base colour set with the function draw_set_colour.


Example:

GML Code Example

draw_line_colour(50, 50, 300, 50, c_red, c_blue);

This would draw a horizontal line from (50,50) to (300,50) with a smooth red to blue gradient.





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