lib/prawn/graphics/join_style.rb in prawn-0.12.0 vs lib/prawn/graphics/join_style.rb in prawn-0.13.0

- old
+ new

@@ -1,6 +1,6 @@ -# encoding: utf-8 +# encoding: utf-8 # join_style.rb : Implements stroke join styling # # Contributed by Daniel Nelson. October, 2009 # @@ -8,11 +8,11 @@ # module Prawn module Graphics module JoinStyle JOIN_STYLES = { :miter => 0, :round => 1, :bevel => 2 } - + # Sets the join style for stroked lines and curves # # style is one of :miter, :round, or :bevel # # NOTE: if this method is never called, :miter will be used for join style @@ -23,22 +23,22 @@ self.current_join_style = style write_stroke_join_style end - + alias_method :join_style=, :join_style private - - def current_join_style + + def current_join_style graphic_state.join_style end - def current_join_style=(style) + def current_join_style=(style) graphic_state.join_style = style end - + def write_stroke_join_style add_content "#{JOIN_STYLES[current_join_style]} j" end end