DrawLine
Description
Draws a 2D line from one point on the screen to another with a chosen color. Lines appear above all other drawing except the Print command and can be used with the GetImage function to create new images. The XY coordinates are in screen coordinates so are not affected by the SetViewOffset command.
Definition
DrawLine( x, y, x2, y2, red, green, blue )
void agk::DrawLine( float x, float y, float x2, float y2, uint32_t red, uint32_t green, uint32_t blue )
DrawLine( x, y, x2, y2, color1, color2 )
void agk::DrawLine( float x, float y, float x2, float y2, uint32_t color1, uint32_t color2 )
Parameters
- x - The X component of the start position of the line.
- y - The Y component of the start position of the line.
- x2 - The X component of the end position of the line.
- y2 - The Y component of the end position of the line.
- red - The red component of the line color.
- green - The green component of the line color.
- blue - The blue component of the line color.
- color1 - The color to use at the start of the line.
- color2 - The color to use at the end of the line.