Sha256: 2da95257c9fa5c05b89d253f55ff1dd64975b9e9632cb266d740b3b424609b2c

Contents?: true

Size: 827 Bytes

Versions: 10

Compression:

Stored size: 827 Bytes

Contents

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require 'prawn'

Prawn::Document.generate("bounding_boxes.pdf") do   
      
  bounding_box [100,600], :width => 200 do
    text "The rain in spain falls mainly on the plains " * 5
    stroke do
      line bounds.top_left,    bounds.top_right
      line bounds.bottom_left, bounds.bottom_right
    end
  end

  bounding_box [100,500], :width => 200, :height => 200 do
    stroke do
      circle_at [100,100], :radius => 100
      line bounds.top_left, bounds.bottom_right
      line bounds.top_right, bounds.bottom_left
    end   
  
    bounding_box [50,150], :width => 100, :height => 100 do
      stroke_rectangle bounds.top_left, bounds.width, bounds.height
    end   
  end
      
end        
     
                 
                 
                          

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
fullcirclegroup-fullcirclegroup-prawn-0.2.99.2 examples/bounding_boxes.rb
fullcirclegroup-prawn-0.2.99.3 examples/bounding_boxes.rb
satoko-prawn-0.2.99.6 examples/bounding_boxes.rb
prawn-0.1.0 examples/bounding_boxes.rb
prawn-0.1.2 examples/bounding_boxes.rb
prawn-0.1.1 examples/bounding_boxes.rb
prawn-0.2.1 examples/bounding_boxes.rb
prawn-0.2.2 examples/bounding_boxes.rb
prawn-0.2.0 examples/bounding_boxes.rb
prawn-0.2.3 examples/bounding_boxes.rb