Class: Svg::Rectangle
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#radius_x ⇒ Object
Returns the value of attribute radius_x.
-
#radius_y ⇒ Object
Returns the value of attribute radius_y.
-
#top ⇒ Object
Returns the value of attribute top.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from Feature
#fill, #fill_opacity, #stroke, #stroke_opacity, #stroke_width, #style
Instance Method Summary collapse
Methods inherited from Feature
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
87 88 89 |
# File 'lib/svg.rb', line 87 def height @height end |
#radius_x ⇒ Object
Returns the value of attribute radius_x.
87 88 89 |
# File 'lib/svg.rb', line 87 def radius_x @radius_x end |
#radius_y ⇒ Object
Returns the value of attribute radius_y.
87 88 89 |
# File 'lib/svg.rb', line 87 def radius_y @radius_y end |
#top ⇒ Object
Returns the value of attribute top.
87 88 89 |
# File 'lib/svg.rb', line 87 def top @top end |
#width ⇒ Object
Returns the value of attribute width.
87 88 89 |
# File 'lib/svg.rb', line 87 def width @width end |
Instance Method Details
#to_svg ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/svg.rb', line 88 def to_svg string_val = "<rect" string_val += point_to_s 'x', 'y', top string_val += attr_to_s 'rx', radius_x string_val += attr_to_s 'ry', radius_y string_val += attr_to_s 'width', width string_val += attr_to_s 'height', height if not style.nil? string_val += " style=\"#{style.to_s}\"" end string_val += "/>" return string_val end |