Draws a straight line between two points.
line(x1, y1, x2, y2, color)
x1, y1: Starting pointx2, y2: Ending pointcolor: Color allocated via image.color(r,g,b,a=0)img = GD::Image.new(400,300)
blue = img.color(0,0,255)
img.line(20,20,380,280,blue)
img.save("line.png")
This method maps directly to gdImageLine in libgd.