Class: Svg::Ellipse
Instance Attribute Summary collapse
-
#center_x ⇒ Object
Returns the value of attribute center_x.
-
#center_y ⇒ Object
Returns the value of attribute center_y.
-
#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_x ⇒ Object
Returns the value of attribute center_x.
102 103 104 |
# File 'lib/svg.rb', line 102 def center_x @center_x end |
#center_y ⇒ Object
Returns the value of attribute center_y.
102 103 104 |
# File 'lib/svg.rb', line 102 def center_y @center_y end |
#radius_x ⇒ Object
Returns the value of attribute radius_x.
102 103 104 |
# File 'lib/svg.rb', line 102 def radius_x @radius_x end |
#radius_y ⇒ Object
Returns the value of attribute radius_y.
102 103 104 |
# File 'lib/svg.rb', line 102 def radius_y @radius_y end |
Instance Method Details
#to_svg ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/svg.rb', line 103 def to_svg string_val = "<ellipse" string_val += attr_to_s 'cx', center_x string_val += attr_to_s 'cy', center_y 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 |