lib/prawn/graphics.rb in prawn-0.3.0 vs lib/prawn/graphics.rb in prawn-0.4.0
- old
+ new
@@ -5,11 +5,10 @@
# Copyright April 2008, Gregory Brown. All Rights Reserved.
#
# This is free software. Please see the LICENSE and COPYING files for details.
require "enumerator"
-require "prawn/graphics/cell"
require "prawn/graphics/color"
module Prawn
# Implements the drawing facilities for Prawn::Document.
@@ -82,10 +81,16 @@
def line_width=(width)
@line_width = width
add_content("#{width} w")
end
- # The current line thickness
+ # When called without an argument, returns the current line thickness.
+ # When called with an argument, sets the line thickness to the specified
+ # value (in PDF points)
+ #
+ # pdf.line_width #=> 1
+ # pdf.line_width(5)
+ # pdf.line_width #=> 5
#
def line_width(width=nil)
if width
self.line_width = width
else