# File lib/gd2/canvas.rb, line 345
    def rectangle(x1, y1, x2, y2, filled = false)
      (filled ? FilledRectangle : Rectangle).new(point(x1, y1), point(x2, y2)).
        draw(@image, filled ? fill_pixel : line_pixel)
    end