Method: Magick::RVG::ShapeConstructors#polygon

Defined in:
lib/rvg/embellishable.rb

#polygon(*points) ⇒ Object

Draws a polygon. The arguments are [x, y] pairs that define the points that make up the polygon. At least two points must be specified. If the last point is not the same as the first, adds an additional point to close the polygon.


314
315
316
317
318
# File 'lib/rvg/embellishable.rb', line 314

def polygon(*points)
    polygon = Polygon.new(*points)
    @content << polygon
    return polygon
end