Module | Magick::RVG::ImageConstructors |
In: |
lib/rvg/embellishable.rb
|
Composite a raster image at [x,y] in a viewport of the specified width and height. If not specified, the width and height are the width and height of the image. Use the RVG::PreserveAspectRatio#preserve_aspect_ratio method to control the placement and scaling of the image within the viewport. By default, the image is scaled to fit inside the viewport and centered within the viewport.
# File lib/rvg/embellishable.rb, line 396 396: def image(image, width=nil, height=nil, x=0, y=0) 397: img = Image.new(image, width, height, x, y) 398: @content << img 399: return img 400: end