class Prawn::SVG::Elements::Line
Public Instance Methods
apply()
click to toggle source
# File lib/prawn/svg/elements/line.rb, line 11 def apply apply_commands apply_markers end
parse()
click to toggle source
# File lib/prawn/svg/elements/line.rb, line 4 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
Protected Instance Methods
commands()
click to toggle source
# File lib/prawn/svg/elements/line.rb, line 18 def commands @commands ||= [ Prawn::SVG::Pathable::Move.new([@x1, @y1]), Prawn::SVG::Pathable::Line.new([@x2, @y2]) ] end