Sha256: c380023b766633c1f942cec6dd6460d79a809eb6ff9c1c6c5f9d12d74b9111be
Contents?: true
Size: 508 Bytes
Versions: 17
Compression:
Stored size: 508 Bytes
Contents
class Prawn::SVG::Elements::Polygon < Prawn::SVG::Elements::Base include Prawn::SVG::Pathable def parse require_attributes('points') @points = parse_points(attributes['points']) end def apply apply_commands apply_markers end protected def commands @commands ||= [ Prawn::SVG::Pathable::Move.new(@points[0]) ] + @points[1..-1].map { |point| Prawn::SVG::Pathable::Line.new(point) } + [ Prawn::SVG::Pathable::Close.new(@points[0]) ] end end
Version data entries
17 entries across 17 versions & 1 rubygems