# File lib/gd2/canvas.rb, line 350 def polygon(points, filled = false, open = false) points = points.map { |(x, y)| point(x, y) } if filled FilledPolygon.new(points).draw(@image, fill_pixel) else (open ? OpenPolygon : Polygon).new(points).draw(@image, line_pixel) end end