class Magick::RVG::Rect
def initialize(width, height, x=0, y=0)
If either width or height is 0, the rectangle is not rendered.
Define a width x height rectangle. The upper-left corner is at [x, y].
def initialize(width, height, x=0, y=0) super() width, height, x, y = Magick::RVG.convert_to_float(width, height, x, y) if width < 0 || height < 0 raise ArgumentError, "width, height must be >= 0 (#{width}, #{height} given)" end @args = [x, y, x+width, y+height] @primitive = :rectangle end
def round(rx, ry=nil)
Specify optional rounded corners for a rectangle. The arguments
def round(rx, ry=nil) rx, ry = Magick::RVG.convert_to_float(rx, ry || rx) if rx < 0 || ry < 0 raise ArgumentError, "rx, ry must be >= 0 (#{rx}, #{ry} given)" end @args << rx << ry @primitive = :roundrectangle self end