Class: SVG::Circle
- Inherits:
-
ElementBase
- Object
- ElementBase
- SVG::Circle
- Defined in:
- lib/ruby-svg/element.rb
Overview
#
Circle Class
Instance Attribute Summary collapse
-
#cx ⇒ Object
Returns the value of attribute cx.
-
#cy ⇒ Object
Returns the value of attribute cy.
-
#r ⇒ Object
Returns the value of attribute r.
Attributes inherited from ElementBase
#attr, #class, #id, #style, #transform
Instance Method Summary collapse
-
#initialize(cx, cy, r) ⇒ Circle
constructor
A new instance of Circle.
- #to_s ⇒ Object
Constructor Details
#initialize(cx, cy, r) ⇒ Circle
Returns a new instance of Circle.
152 153 154 155 156 157 158 |
# File 'lib/ruby-svg/element.rb', line 152 def initialize(cx, cy, r) super() @cx = cx @cy = cy @r = r end |
Instance Attribute Details
#cx ⇒ Object
Returns the value of attribute cx.
160 161 162 |
# File 'lib/ruby-svg/element.rb', line 160 def cx @cx end |
#cy ⇒ Object
Returns the value of attribute cy.
160 161 162 |
# File 'lib/ruby-svg/element.rb', line 160 def cy @cy end |
#r ⇒ Object
Returns the value of attribute r.
160 161 162 |
# File 'lib/ruby-svg/element.rb', line 160 def r @r end |
Instance Method Details
#to_s ⇒ Object
162 163 164 165 166 167 |
# File 'lib/ruby-svg/element.rb', line 162 def to_s text = %|<circle cx="#{@cx}" cy="#{@cy}" r="#{@r}"| text << super() text << %| />| return text end |