class Prawn::SVG::Elements::Line
Public Instance Methods
apply()
click to toggle source
# File lib/prawn/svg/elements/line.rb, line 14 def apply apply_commands apply_markers end
parse()
click to toggle source
# File lib/prawn/svg/elements/line.rb, line 4 def parse # Lines are one dimensional, so cannot be filled. computed_properties.fill = 'none' @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 21 def commands @commands ||= [ Prawn::SVG::Pathable::Move.new([@x1, @y1]), Prawn::SVG::Pathable::Line.new([@x2, @y2]) ] end