Class Magick::RVG::Ellipse
In: lib/rvg/embellishable.rb
Parent: Shape
Enum GeometryValue Stylable RVG\n[lib/rvg/clippath.rb\nlib/rvg/container.rb\nlib/rvg/deep_equal.rb\nlib/rvg/describable.rb\nlib/rvg/embellishable.rb\nlib/rvg/misc.rb\nlib/rvg/paint.rb\nlib/rvg/pathdata.rb\nlib/rvg/rvg.rb\nlib/rvg/stretchable.rb\nlib/rvg/stylable.rb\nlib/rvg/text.rb\nlib/rvg/transformable.rb\nlib/rvg/units.rb] Transformable Stretchable Embellishable Describable Duplicatable Comparable Image ImageList Array Geometry HatchFill Draw lib/RMagick.rb lib/rvg/misc.rb Application ObjectData Pre_ObjectData_Descriptor Envelope Post_ObjectData_Descriptor IPTC Magick dot/m_14_0.png

Methods

new  

Public Class methods

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.

[Source]

    # File lib/rvg/embellishable.rb, line 48
48:             def initialize(rx, ry, cx=0, cy=0)
49:                 super()
50:                 rx, ry, cx, cy = Magick::RVG.convert_to_float(rx, ry, cx, cy)
51:                 if rx < 0 || ry < 0
52:                     raise ArgumentError, "radii must be >= 0 (#{rx}, #{ry} given)"
53:                 end
54:                 @primitive = :ellipse
55:                 # Ellipses are always complete.
56:                 @args = [cx, cy, rx, ry, 0, 360]
57:             end

[Validate]