class Magick::RVG::Circle

Public Class Methods

new(r, cx = 0, cy = 0) click to toggle source

Define a circle with radius r and centered at [cx, cy]. Use the Magick::RVG::ShapeConstructors#circle method to create Circle objects in a container.

Calls superclass method
# File lib/rvg/embellishable.rb, line 26
def initialize(r, cx = 0, cy = 0)
  super()
  r, cx, cy = Magick::RVG.convert_to_float(r, cx, cy)
  if r < 0
    fail ArgumentError, "radius must be >= 0 (#{r} given)"
  end
  @primitive = :circle
  @args = [cx, cy, cx+r, cy]
  self
end