Draws a rectangular outline on the image.
rectangle(x1, y1, x2, y2, color)
x1, y1: Top-left cornerx2, y2: Bottom-right cornercolor: Color allocated via image.color(r,g,b,a=0)img = GD::Image.new(400,300)
red = img.color(255,0,0)
img.rectangle(50,50,200,150,red)
img.save("rect.png")
This method maps directly to the native gdImageRectangle function in libgd.