vendor/gems/prawn-0.3.0/lib/prawn/graphics.rb
# Draws a polygon from the specified points.
#
#    # draws a snazzy triangle
#    pdf.polygon [100,100], [100,200], [200,200]
#
Draws a polygon from the specified points.
Draws a polygon from the specified points .
def polygon(*points)
      move_to points[0]
      (points << points[0]).each_cons(2) do |p1,p2|
        line_to(*p2)
      end
    end
def polygon ( * points ) move_to points [ 0 ] ( points << points [ 0 ] ) . each_cons ( 2 ) do | p1 , p2 | line_to ( * p2 ) end end
Draws a polygon from the specified points.
Draws a polygon from the specified points .
points
<not_specific>