lib/prawn/graphics/cap_style.rb in prawn-1.0.0.rc2 vs lib/prawn/graphics/cap_style.rb in prawn-1.0.0
- old
+ new
@@ -1,16 +1,17 @@
-# encoding: utf-8
+# encoding: utf-8
# cap_style.rb : Implements stroke cap styling
#
# Contributed by Daniel Nelson. October, 2009
#
# This is free software. Please see the LICENSE and COPYING files for details.
#
module Prawn
module Graphics
module CapStyle
+ # @group Stable API
CAP_STYLES = { :butt => 0, :round => 1, :projecting_square => 2 }
# Sets the cap style for stroked lines and curves
#
@@ -28,14 +29,14 @@
alias_method :cap_style=, :cap_style
private
- def current_cap_style
+ def current_cap_style
graphic_state.cap_style
end
- def current_cap_style=(style)
+ def current_cap_style=(style)
graphic_state.cap_style = style
end
def write_stroke_cap_style
add_content "#{CAP_STYLES[current_cap_style]} J"