Sha256: 183604420745bc9a9a8bb7707a7d6501b4593477072faee5013c063d18802e0f

Contents?: true

Size: 385 Bytes

Versions: 5

Compression:

Stored size: 385 Bytes

Contents

# encoding: utf-8
#
# Draws and fills a Hexagon using Document#polygon
#
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require "prawn"

pdf = Prawn::Document.new
                        
pdf.fill_color "ff0000"
pdf.fill_polygon [100, 250], [200, 300], [300, 250],
                 [300, 150], [200, 100], [100, 150]            

pdf.render_file "hexagon.pdf"

Version data entries

5 entries across 5 versions & 2 rubygems

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