Sha256: cc1e141435bc83a56803da163123a4ac96354452fcad6ee6225b0734ed842a94

Contents?: true

Size: 670 Bytes

Versions: 5

Compression:

Stored size: 670 Bytes

Contents

# encoding: utf-8
#
# Demonstrates vertical and horizontal positioning of images.
#
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require "prawn"
   
Prawn::Document.generate("image_position.pdf", :page_layout => :landscape) do

  dice = "#{Prawn::BASEDIR}/data/images/dice.png"

  image dice, :scale => 0.2, :position => :left,   :vposition => :top
  image dice, :scale => 0.2, :position => :right,  :vposition => :top
  image dice, :scale => 0.2, :position => :center, :vposition => :top
  image dice, :scale => 0.2, :position => :center, :vposition => :center
  image dice, :scale => 0.2, :position => :center, :vposition => :bottom
  
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
kavu-prawn-core-0.4.100 examples/graphics/image_position.rb
kavu-prawn-core-0.4.99 examples/graphics/image_position.rb
prawn-0.3.0 examples/graphics/image_position.rb
prawn-0.4.0 examples/graphics/image_position.rb
prawn-0.4.1 examples/graphics/image_position.rb