Sha256: 4ab64c782cd343000db52a73c7eb5ea9ea3f16aafff0de72793157df81cf4af2

Contents?: true

Size: 730 Bytes

Versions: 5

Compression:

Stored size: 730 Bytes

Contents

# encoding: utf-8
#
# The very first Prawn example.  Here for nostalgia's sake.
#
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require "prawn"
 
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

5 entries across 5 versions & 2 rubygems

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