Sha256: b37985dff114334c6bf0e88bfaac2fcadd1b10616174b273ebf24ac3bba15b6a
Contents?: true
Size: 674 Bytes
Versions: 2
Compression:
Stored size: 674 Bytes
Contents
# encoding: utf-8 # # Demonstrates Document#stroke_bounds, which will stroke a rectange outlining # the boundaries of the current bounding box. This is useful for debugging # and can also be used as a light-weight and lower level alternative to # Cells. # # Feature borrowed from Josh Knowle's pt at: # http://github.com/joshknowles/pt/tree/master # require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) Prawn::Document.generate("stroke_bounds.pdf") do stroke_bounds bounding_box [100,500], :width => 200, :height => 300 do text "Hey there, here's some text. " * 10 stroke_bounds end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
prawn-0.11.1 | examples/graphics/stroke_bounds.rb |
davebenvenuti-prawn-0.11.1.pre | examples/graphics/stroke_bounds.rb |