### Home Classes Methods

### In Files

- lib/rvg/embellishable.rb

### Parent

Magick::RVG::Shape

### Methods

- ::new
- #round

### Files

- MANIFEST
- Makefile

### Class/Module Index

Quicksearch

- Magick
- Magick::DestroyedImageError
- Magick::Draw
- Magick::Enum
- Magick::FatalImageMagickError
- Magick::Geometry
- Magick::GeometryValue
- Magick::GradientFill
- Magick::HatchFill
- Magick::IPTC
- Magick::IPTC::Application
- Magick::IPTC::Envelope
- Magick::IPTC::ObjectData
- Magick::IPTC::Post_ObjectData_Descriptor
- Magick::IPTC::Pre_ObjectData_Descriptor
- Magick::Image
- Magick::Image::DrawOptions
- Magick::Image::Info
- Magick::Image::PolaroidOptions
- Magick::Image::View
- Magick::Image::View::Pixels
- Magick::Image::View::Rows
- Magick::ImageList
- Magick::ImageList::Montage
- Magick::ImageMagickError
- Magick::OptionalMethodArguments
- Magick::Pixel
- Magick::RVG
- Magick::RVG::Circle
- Magick::RVG::ClipPath
- Magick::RVG::Describable
- Magick::RVG::Duplicatable
- Magick::RVG::Ellipse
- Magick::RVG::Embellishable
- Magick::RVG::Group
- Magick::RVG::Image
- Magick::RVG::ImageConstructors
- Magick::RVG::Line
- Magick::RVG::Path
- Magick::RVG::PathData
- Magick::RVG::Pattern
- Magick::RVG::PolyShape
- Magick::RVG::Polygon
- Magick::RVG::Polyline
- Magick::RVG::PreserveAspectRatio
- Magick::RVG::Rect
- Magick::RVG::ShapeConstructors
- Magick::RVG::Stretchable
- Magick::RVG::StructureConstructors
- Magick::RVG::Stylable
- Magick::RVG::Text
- Magick::RVG::TextBase
- Magick::RVG::TextConstructors
- Magick::RVG::Transformable
- Magick::RVG::Use
- Magick::RVG::UseConstructors
- Magick::RVG::Utility
- Magick::RVG::Utility::DefaultTextStrategy
- Magick::RVG::Utility::GraphicContext
- Magick::RVG::Utility::LRTextStrategy
- Magick::RVG::Utility::RLTextStrategy
- Magick::RVG::Utility::TBTextStrategy
- Magick::RVG::Utility::TextAttributes
- Magick::RVG::Utility::TextStrategy
- Magick::TextureFill
- Object

No matching classes.

# Magick::RVG::Rect

### Public Class Methods

new(width, height, x=0, y=0) click to toggle source

Define a width x height rectangle. The upper-left corner is at [`x`, `y`]. If either `width` or `height` is 0, the rectangle is not rendered. Use the RVG::ShapeConstructors#rect method to create Rect objects in a container.

    # File lib/rvg/embellishable.rb, line 91
    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

### Public Instance Methods

round(rx, ry=nil) click to toggle source

Specify optional rounded corners for a rectangle. The arguments are the x- and y-axis radii. If y is omitted it defaults to x.

    # File lib/rvg/embellishable.rb, line 103
    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

[Validate]

Generated with the Darkfish Rdoc Generator 2.