Sha256: da790a0439925c2a0bc26b782b4686020ffd0e45a19c3f748a598bc9ea36ed0d

Contents?: true

Size: 798 Bytes

Versions: 13

Compression:

Stored size: 798 Bytes

Contents

# encoding: utf-8
#
# Demonstrates basic image embedding and positioning functionality.
# For positioning images alongside flowing text, see the image_flow.rb
# example.
#
require "#{File.dirname(__FILE__)}/../example_helper.rb"
   
Prawn::Document.generate("basic_images.pdf", :page_layout => :landscape) do     
  stef = "#{Prawn::BASEDIR}/data/images/stef.jpg"
  image stef, :at => [75, 75] 
  
  stef = "#{Prawn::BASEDIR}/data/images/stef.jpg"
  image stef, :at => [500, 400], :width => 200, :height => 200 
  
  draw_text "Please enjoy the pigs", :size => 36, :at => [200,15]   
  
  ruport = "#{Prawn::BASEDIR}/data/images/ruport.png"  
  image ruport, :at => [400,200], :width => 150 

  ruport = "#{Prawn::BASEDIR}/data/images/ruport_transparent.png"  
  image ruport, :at => [50,525] 
end

Version data entries

13 entries across 13 versions & 6 rubygems

Version Path
piglop-prawn-0.10.2.3 examples/graphics/basic_images.rb
piglop-prawn-0.10.2.2 examples/graphics/basic_images.rb
piglop-prawn-0.10.2.1 examples/graphics/basic_images.rb
prawn-0.11.1.pre examples/graphics/basic_images.rb
goodwill-prawn-edge-0.10.0 examples/graphics/basic_images.rb
alphasights-prawn-0.10.4 examples/graphics/basic_images.rb
alphasights-prawn-0.10.3 examples/graphics/basic_images.rb
alphasights-prawn-0.10.2 examples/graphics/basic_images.rb
alphasights-prawn-0.10.1 examples/graphics/basic_images.rb
alphasights-prawn-0.10.0 examples/graphics/basic_images.rb
prawn-core-0.8.4 examples/graphics/basic_images.rb
prawn-graph-0.0.2 vendor/prawn-core/examples/graphics/basic_images.rb
prawn-graph-0.0.1 vendor/prawn-core/examples/graphics/basic_images.rb