Sha256: 00735c4ff14f7c29ee9d1a324fa63cfd3deb5c378dfc999fc1d9725aa7ad4561
Contents?: true
Size: 500 Bytes
Versions: 4
Compression:
Stored size: 500 Bytes
Contents
class Prawn::SVG::Elements::Line < Prawn::SVG::Elements::Base include Prawn::SVG::Pathable def parse @x1 = x_pixels(attributes['x1'] || 0) @y1 = y_pixels(attributes['y1'] || 0) @x2 = x_pixels(attributes['x2'] || 0) @y2 = y_pixels(attributes['y2'] || 0) end def apply apply_commands apply_markers end protected def commands @commands ||= [ Prawn::SVG::Pathable::Move.new([@x1, @y1]), Prawn::SVG::Pathable::Line.new([@x2, @y2]) ] end end
Version data entries
4 entries across 4 versions & 1 rubygems