Class: Svg::Circle
Instance Attribute Summary collapse
-
#center ⇒ Object
Returns the value of attribute center.
-
#radius ⇒ Object
Returns the value of attribute radius.
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.
67 68 69 |
# File 'lib/svg.rb', line 67 def center @center end |
#radius ⇒ Object
Returns the value of attribute radius.
67 68 69 |
# File 'lib/svg.rb', line 67 def radius @radius end |
Instance Method Details
#to_svg ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/svg.rb', line 68 def to_svg string_val = "<circle" string_val += point_to_s 'cx', 'cy', center string_val += attr_to_s 'r', radius string_val += attr_to_s 'stroke', stroke string_val += attr_to_s 'stroke-width', stroke_width string_val += attr_to_s 'fill', fill if not style.nil? string_val += " style=\"#{style.to_s}\"" end string_val += "/>" return string_val end |