Sha256: 1ba1d23f52c20eedec6ac21d8ef207ed892c34b59fdd8faedda163729bf23158

Contents?: true

Size: 415 Bytes

Versions: 2

Compression:

Stored size: 415 Bytes

Contents

# encoding: utf-8
#
# Draws and fills a Hexagon using Document#polygon
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

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

2 entries across 2 versions & 2 rubygems

Version Path
prawn-0.11.1 examples/graphics/hexagon.rb
davebenvenuti-prawn-0.11.1.pre examples/graphics/hexagon.rb