class RSVGR::Path

Public Class Methods

new(args = {}) click to toggle source
Calls superclass method
# File lib/rsvgr.rb, line 52
def initialize args = {}
  @fill_color = "none"
  super
end

Public Instance Methods

to_s() click to toggle source
# File lib/rsvgr.rb, line 56
def to_s
  "<path"                                                                 +
  " d=\"#{@d || "M " + @points.map{ |x, y|
    "#{DEFAULT_SIZE * x} #{DEFAULT_SIZE * y}"
    }.join(" L ")}\""  +
  "#{" stroke=\"#{@stroke_color}\"" if @stroke_color}"                    +
  "#{" stroke-width=\"#{@stroke_width}\"" if @stroke_width}"              +
  " fill=\"#{@fill_color}\""                                              +
  "/>\n"
end