Sha256: 92f5b8979c5a5921445542a73aa84230d2754542820460efca4dfddeafe746cf

Contents?: true

Size: 698 Bytes

Versions: 21

Compression:

Stored size: 698 Bytes

Contents

# encoding: utf-8
#
# The very first Prawn example.  Here for nostalgia's sake.
#
require "#{File.dirname(__FILE__)}/../example_helper.rb"
 
pdf = Prawn::Document.new   
pdf.line_width = 10    

[[100,741,100,641], 
 [100,691,150,691],
 [150,741,150,641],
 [200,741,200,641],   
 [100,600,100,500],
 [100,600,150,550],
 [100,550,150,550],
 [175,600,175,500], 
 [175,600,225,550], 
 [175,550,225,550],
 [175,550,225,500],
 [275,600,250,500],
 [275,600,300,500],   
 [250,550,300,550],
 [315,600,350,500],
 [350,500,365,550], 
 [365,550,380,500],
 [380,500,415,600], 
 [430,600,430,500],
 [430,600,465,500],
 [465,600,465,500]].each { |points| pdf.stroke_line(*points) }

pdf.render_file "lines.pdf"

Version data entries

21 entries across 21 versions & 7 rubygems

Version Path
piglop-prawn-0.10.2.3 examples/graphics/line.rb
piglop-prawn-0.10.2.2 examples/graphics/line.rb
piglop-prawn-0.10.2.1 examples/graphics/line.rb
prawn-0.11.1.pre examples/graphics/line.rb
goodwill-prawn-edge-0.10.0 examples/graphics/line.rb
alphasights-prawn-0.10.4 examples/graphics/line.rb
alphasights-prawn-0.10.3 examples/graphics/line.rb
alphasights-prawn-0.10.2 examples/graphics/line.rb
alphasights-prawn-0.10.1 examples/graphics/line.rb
alphasights-prawn-0.10.0 examples/graphics/line.rb
prawn-core-0.8.4 examples/graphics/line.rb
prawn-graph-0.0.2 vendor/prawn-core/examples/graphics/line.rb
prawn-graph-0.0.1 vendor/prawn-core/examples/graphics/line.rb
prawn-core-0.7.2 examples/graphics/line.rb
prawn-core-0.7.1 examples/graphics/line.rb
prawn-layout-0.3.2 vendor/prawn-core/examples/graphics/line.rb
prawn-core-0.6.3 examples/graphics/line.rb
prawn-core-0.6.2 examples/graphics/line.rb
prawn-layout-0.3.1 vendor/prawn-core/examples/graphics/line.rb
prawn-core-0.6.1 examples/graphics/line.rb