--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Add an image easily to a PDF document. <tt>image</tt> is the name of a JPG or PNG image. <tt>options</tt> is a Hash:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:pad</tt>:"
    body: The number of PDF userspace units that will be on all sides of the image. The default is <tt>5</tt> units.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:width</tt>:"
    body: The desired width of the image. The image will be resized to this width with the aspect ratio kept. If unspecified, the image's natural width will be used.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:resize</tt>:"
    body: How to resize the image, either :width (resizes the image to be as wide as the margins) or :full (resizes the image to be as large as possible). May be a numeric value, used as a multiplier for the image size (e.g., 0.5 will shrink the image to half-sized). If this and <tt>:width</tt> are unspecified, the image's natural size will be used. Mutually exclusive with the &lt;tt&gt;:width&lt;tt&gt; option.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:justification</tt>:"
    body: The placement of the image. May be :center, :right, or :left. Defaults to :left.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:border</tt>:"
    body: The border options. No default border. If specified, must be either <tt>true</tt>, which uses the default border, or a Hash.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:link</tt>:"
    body: Makes the image a clickable link.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "Image borders are specified as a hash with two options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:color</tt>:"
    body: The colour of the border. Defaults to 50% grey.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:style</tt>:"
    body: The stroke style of the border. This must be a StrokeStyle object and defaults to the default line.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: "Image links are defined as a hash with two options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:type</tt>:"
    body: The type of link, either <tt>:internal</tt> or <tt>:external</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "<tt>:target</tt>:"
    body: The destination of the link. For an <tt>:internal</tt> link, this is an internal cross-reference destination. For an <tt>:external</tt> link, this is an URI.
  type: :NOTE
full_name: PDF::Writer::Graphics#image
is_singleton: false
name: image
params: (image, options = {})
visibility: public
