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 29 29: def initialize(r, cx=0, cy=0) 30: super() 31: r, cx, cy = Magick::RVG.convert_to_float(r, cx, cy) 32: if r < 0 33: raise ArgumentError, "radius must be >= 0 (#{r} given)" 34: end 35: @primitive = :circle 36: @args = [cx, cy, cx+r, cy] 37: self 38: end