Class: RSVGR::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/rsvgr.rb

Direct Known Subclasses

Samples::Grid, Samples::Plot

Instance Method Summary collapse

Instance Method Details

#to_sObject

def to_s additional_child = []



128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/rsvgr.rb', line 128

def to_s
  "<g transform=\""                                                                                        +
    "#{" translate(#{DEFAULT_SIZE * (@x || 0)},#{DEFAULT_SIZE * (@y || 0)})" if @x || @y}"                 +
    "#{" scale(#{@scale_x || @scale || 1},#{@scale_y || @scale || 1})" if @scale_x || @scale_y || @scale}" +
    "#{" rotate(#{@rotate})" if @rotate}\""                                                                +
  # "#{" id=\"#{@id}\"" if @id}"                                                                             +
  "#{" fill=\"#{@fill_color}\"" if @fill_color}"                                                           +
  "#{" stroke-width=\"#{@stroke_width}\"" if @stroke_width}"                                               +
  "#{" stroke=\"#{@stroke_color}\"" if @stroke_color}"                                                     +
  ">\n" + to_s_children + "</g>\n"
  # ">\n" + to_s_children(additional_child) + "</g>\n"
end