public Method

StructureConstructors.rvg(cols, rows, x=0, y=0, &block)

Establishes a new viewport. [x, y] is the coordinate of the upper-left corner within the containing viewport. This is a container method. Styles and transforms specified on this object will be used by objects contained within, unless overridden by an inner container or the contained object itself.

Source Code

# File rvg/embellishable.rb, line 356
def rvg(cols, rows, x=0, y=0, &block)
    rvg = Magick::RVG.new(cols, rows, &block)
    begin
        x, y = Float(x), Float(y)
    rescue ArgumentError
        args = [cols, rows, x, y]
        raise ArgumentError, "at least one argument is not convertable to Float (got #{args.collect {|a| a.class}.join(', ')})"
    end
    rvg.corner(x, y)
    @content << rvg
    return rvg
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.