draw_line(VECTOR*, COLOR*, var alpha)
Draw a line to the given XY position with the given color and transparency.
Parameters:
VECTOR* - the end position of the line. The start position is the
position of the last draw_line instruction. The Z value must be 0.
COLOR* - the end color of the line. The start color
is the color of the last draw_line instruction. If NULL is given, no
line is drawn, but the position is set for the start of the next line.
alpha - the end transparency of the line, 0..100.
Speed:
fast
Example:
function draw_red_rect(x1,y1,x2,y2)
{
while(1)
{
draw_line(vector(x1,y1,0),NULL,100); // move to first corner
draw_line(vector(x2,y1,0),vector(0,0,255),100);
draw_line(vector(x2,y2,0),vector(0,0,255),100);
draw_line(vector(x1,y2,0),vector(0,0,255),100);
draw_line(vector(x1,y1,0),vector(0,0,255),100);
wait(1);
}
}
See also:
draw_text