Sha256: 5d729f025738a40d5ef353e1baa366281ca3842faf3728a2b82357d86c7256bf

Contents?: true

Size: 636 Bytes

Versions: 8

Compression:

Stored size: 636 Bytes

Contents

# encoding: utf-8
#
# To scale an image use the <code>:scale</code> option.
#
# It scales the image proportionally given the provided value.
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::ManualBuilder::Example.generate(filename) do
  text  "Normal size"
  image "#{Prawn::DATADIR}/images/stef.jpg"
  move_down 20

  text  "Scaled to 50%"
  image "#{Prawn::DATADIR}/images/stef.jpg", :scale => 0.5
  move_down 20

  text  "Scaled to 200%"
  image "#{Prawn::DATADIR}/images/stef.jpg", :scale => 2
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
prawn-2.1.0 manual/images/scale.rb
prawn-git-2.0.1 manual/images/scale.rb
prawn-2.0.2 manual/images/scale.rb
prawn-2.0.1 manual/images/scale.rb
prawn-2.0.0 manual/images/scale.rb
prawn-1.3.0 manual/images/scale.rb
prawn-1.2.1 manual/images/scale.rb
prawn-1.1.0 manual/images/scale.rb