class RSVGR::Rect
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/rsvgr.rb, line 90 def initialize *args @x = 0 @y = 0 @width = 1 @height = 1 super end
Public Instance Methods
to_s()
click to toggle source
# File lib/rsvgr.rb, line 97 def to_s "<rect" + " x=\"#{DEFAULT_SIZE * @x}\"" + " y=\"#{DEFAULT_SIZE * @y}\"" + " width=\"#{DEFAULT_SIZE * @width}\"" + " height=\"#{DEFAULT_SIZE * @height}\"" + "#{" stroke=\"#{@stroke_color}\"" if @stroke_color}" + "#{" stroke-width=\"#{@stroke_width}\"" if @stroke_width}" + "#{" fill=\"#{@fill_color}\"" if @fill_color}" + "/>\n" end