lib/prawn/graphics/join_style.rb in prawn-0.11.1.pre vs lib/prawn/graphics/join_style.rb in prawn-0.11.1
- old
+ new
@@ -17,22 +17,31 @@
#
# NOTE: if this method is never called, :miter will be used for join style
# throughout the document
#
def join_style(style=nil)
- return @join_style || :miter if style.nil?
+ return current_join_style || :miter if style.nil?
- @join_style = style
+ self.current_join_style = style
write_stroke_join_style
end
alias_method :join_style=, :join_style
private
+
+ def current_join_style
+ graphic_state.join_style
+ end
+ def current_join_style=(style)
+ graphic_state.join_style = style
+ end
+
+
def write_stroke_join_style
- add_content "#{JOIN_STYLES[@join_style]} j"
+ add_content "#{JOIN_STYLES[current_join_style]} j"
end
end
end
end