class Magick::RVG::PolyShape
def polypoints(points)
def polypoints(points) case points.length when 1 points = Array(points[0]) when 2 x_coords = Array(points[0]) y_coords = Array(points[1]) raise ArgumentError, 'array arguments must contain at least one point' unless !x_coords.empty? && !y_coords.empty? n = x_coords.length - y_coords.length short = n > 0 ? y_coords : x_coords olen = short.length n.abs.times { |x| short << short[x % olen] } points = x_coords.zip(y_coords).flatten! end n = points.length raise ArgumentError, "insufficient/odd number of points specified: #{n}" if n < 4 || n.odd? Magick::RVG.convert_to_float(*points) end