Class: Svg::Ellipse
Instance Attribute Summary collapse
-
#center ⇒ Object
Returns the value of attribute center.
-
#radius_x ⇒ Object
Returns the value of attribute radius_x.
-
#radius_y ⇒ Object
Returns the value of attribute radius_y.
Attributes inherited from Feature
#fill, #fill_opacity, #stroke, #stroke_opacity, #stroke_width, #style
Instance Method Summary collapse
Methods inherited from Feature
Instance Attribute Details
#center ⇒ Object
Returns the value of attribute center.
108 109 110 |
# File 'lib/svg.rb', line 108 def center @center end |
#radius_x ⇒ Object
Returns the value of attribute radius_x.
108 109 110 |
# File 'lib/svg.rb', line 108 def radius_x @radius_x end |
#radius_y ⇒ Object
Returns the value of attribute radius_y.
108 109 110 |
# File 'lib/svg.rb', line 108 def radius_y @radius_y end |
Instance Method Details
#to_svg ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/svg.rb', line 109 def to_svg string_val = "<ellipse" if not center.nil? string_val += point_to_s 'cx', 'cy', center end string_val += attr_to_s 'rx', radius_x string_val += attr_to_s 'ry', radius_y if not style.nil? string_val += " style=\"#{style.to_s}\"" end string_val += "/>" return string_val end |