manual/basic_concepts/origin.rb in prawn-2.1.0 vs manual/basic_concepts/origin.rb in prawn-2.2.0

- old
+ new

@@ -1,7 +1,5 @@ -# encoding: utf-8 -# # This is the most important concept you need to learn about Prawn: # # PDF documents have the origin <code>[0,0]</code> at the bottom-left corner of # the page. # @@ -19,20 +17,19 @@ # isn't the absolute bottom left corner but the bottom left corner of the margin # box. # # The following snippet strokes a circle on the margin box origin. Then strokes # the boundaries of a bounding box and a circle on its origin. -# -require File.expand_path(File.join(File.dirname(__FILE__), - %w[.. example_helper])) +require_relative '../example_helper' + filename = File.basename(__FILE__).gsub('.rb', '.pdf') Prawn::ManualBuilder::Example.generate(filename) do stroke_axis stroke_circle [0, 0], 10 - bounding_box([100, 300], :width => 300, :height => 200) do + bounding_box([100, 300], width: 300, height: 200) do stroke_bounds stroke_circle [0, 0], 10 end end