Sets the cap style for stroked lines and curves
style is one of :butt, :round, or :projecting_square
NOTE: If this method is never called, :butt will be used by default.
# File lib/prawn/graphics/cap_style.rb, line 20 def cap_style(style=nil) return current_cap_style || :butt if style.nil? self.current_cap_style = style write_stroke_cap_style end
# File lib/prawn/graphics/cap_style.rb, line 32 def current_cap_style graphic_state.cap_style end
# File lib/prawn/graphics/cap_style.rb, line 36 def current_cap_style=(style) graphic_state.cap_style = style end
# File lib/prawn/graphics/cap_style.rb, line 40 def write_stroke_cap_style add_content "#{CAP_STYLES[current_cap_style]} J" end