public Method

Image.view(x, y, width, height) { |view| ... }

Construct a view. If a block is present, yield and pass the view object, otherwise return the view object.

Source Code

# File RMagick.rb, line 945
def view(x, y, width, height)
    view = View.new(self, x, y, width, height)

    if block_given?
        begin
            yield(view)
        ensure
            view.sync
        end
        return nil
    else
        return view
    end
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.