Class | Magick::RVG::Ellipse |
In: |
lib/rvg/embellishable.rb
|
Parent: | Shape |
Define an ellipse with a center at [cx, cy], a horizontal radius rx and a vertical radius ry. Use the RVG::ShapeConstructors#ellipse method to create Ellipse objects in a container.
# File lib/rvg/embellishable.rb, line 47 47: def initialize(rx, ry, cx=0, cy=0) 48: super() 49: rx, ry, cx, cy = Magick::RVG.convert_to_float(rx, ry, cx, cy) 50: if rx < 0 || ry < 0 51: raise ArgumentError, "radii must be >= 0 (#{rx}, #{ry} given)" 52: end 53: @primitive = :ellipse 54: # Ellipses are always complete. 55: @args = [cx, cy, rx, ry, 0, 360] 56: end