draw_parallelogram()
// _________
// | | argument0 = the x of the '0'
// |0-------1| argument1 = the y of the '0'
//|_________| argument2 = the x of the '1'
// argument3 = the y of the '1'
// argument4 = the parallelogram height
// argument5 = right(0) or left(1) ('\' or '/')
// argument6 = color
var half x1 x2 x3 x4 y1 y2 y3 y4;
half = argument4/2;
if argument5 = 0
{
y1 = argument1-half;
x1 = argument0+(half/2);
y2 = argument3-half;
x2 = argument2+(half/2);
y3 = argument1+half;
x3 = argument0-(half/2);
y4 = argument3+half;
x4 = argument2-(half/2);
}
else if argument5 = 1
{
y1 = argument1-half;
x1 = argument0-(half/2);
y2 = argument3-half;
x2 = argument2-(half/2);
y3 = argument1 + half;
x3 = argument0+(half/2);
y4 = argument3+half;
x4 = argument2+(half/2);
}
draw_set_color(argument6)
draw_line(x1,y1,x2,y2);
draw_line(x3,y3,x4,y4);
draw_line(x1,y1,x3,y3);
draw_line(x2,y2,x4,y4);
This page has been viewed 65 times