Class: Magick::RVG::Polygon

Inherits:
PolyShape
  • Object
show all
Defined in:
lib/rvg/embellishable.rb

Overview

class PolyShape

Instance Method Summary collapse

Methods inherited from PolyShape

#polypoints

Methods included from Duplicatable

#deep_copy

Methods included from Transformable

#matrix, #rotate, #scale, #skewX, #skewY, #translate

Methods included from Stylable

#styles

Constructor Details

#initialize(*points) ⇒ Polygon

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. Use the RVG::ShapeConstructors#polygon method to create Polygon objects in a container.



128
129
130
131
132
# File 'lib/rvg/embellishable.rb', line 128

def initialize(*points)
  super()
  @primitive = :polygon
  @args = polypoints(points)
end