Class: SVG::Ellipse
- Inherits:
-
ElementBase
- Object
- ElementBase
- SVG::Ellipse
- Defined in:
- lib/ruby-svg/element.rb
Overview
#
Ellipse Class
Instance Attribute Summary collapse
-
#cx ⇒ Object
Returns the value of attribute cx.
-
#cy ⇒ Object
Returns the value of attribute cy.
-
#rx ⇒ Object
Returns the value of attribute rx.
-
#ry ⇒ Object
Returns the value of attribute ry.
Attributes inherited from ElementBase
#attr, #class, #id, #style, #transform
Instance Method Summary collapse
-
#initialize(cx, cy, rx, ry) ⇒ Ellipse
constructor
A new instance of Ellipse.
- #to_s ⇒ Object
Constructor Details
#initialize(cx, cy, rx, ry) ⇒ Ellipse
Returns a new instance of Ellipse.
175 176 177 178 179 180 181 182 |
# File 'lib/ruby-svg/element.rb', line 175 def initialize(cx, cy, rx, ry) super() @cx = cx @cy = cy @rx = rx @ry = ry end |
Instance Attribute Details
#cx ⇒ Object
Returns the value of attribute cx.
184 185 186 |
# File 'lib/ruby-svg/element.rb', line 184 def cx @cx end |
#cy ⇒ Object
Returns the value of attribute cy.
184 185 186 |
# File 'lib/ruby-svg/element.rb', line 184 def cy @cy end |
#rx ⇒ Object
Returns the value of attribute rx.
184 185 186 |
# File 'lib/ruby-svg/element.rb', line 184 def rx @rx end |
#ry ⇒ Object
Returns the value of attribute ry.
184 185 186 |
# File 'lib/ruby-svg/element.rb', line 184 def ry @ry end |
Instance Method Details
#to_s ⇒ Object
186 187 188 189 190 191 |
# File 'lib/ruby-svg/element.rb', line 186 def to_s text = %|<ellipse cx="#{@cx}" cy="#{@cy}" rx="#{@rx}" ry="#{@ry}"| text << super() text << %| />| return text end |