| Class | Magick::RVG::Circle |
| In: |
lib/rvg/embellishable.rb
|
| Parent: | Shape |
Define a circle with radius r and centered at [cx, cy]. Use the RVG::ShapeConstructors#circle method to create Circle objects in a container.
# File lib/rvg/embellishable.rb, line 30
30: def initialize(r, cx=0, cy=0)
31: super()
32: r, cx, cy = Magick::RVG.convert_to_float(r, cx, cy)
33: if r < 0
34: raise ArgumentError, "radius must be >= 0 (#{r} given)"
35: end
36: @primitive = :circle
37: @args = [cx, cy, cx+r, cy]
38: self
39: end