How to position the background image on the canvas. One of the following symbols:
- :scaled
- Scale the image to the canvas width and height.
- :tiled
- Tile the image across the canvas.
- :fit
- Scale the image to fit within the canvas while retaining the image proportions. Center the image on the canvas. Color any part of the canvas not covered by the image with the background color.
Source Code
# File rvg/rvg.rb, line 163 def background_position=(pos) warn "background_position= has no effect in nested RVG objects" if @nested bg_pos = pos.to_s.downcase if ! ['scaled', 'tiled', 'fit'].include?(bg_pos) raise ArgumentError, "background position must be `scaled', `tiled', or `fit' (#{pos} given)" end @background_position = bg_pos.to_sym end
<code/>and<pre/>for code samples.