module Prawn::Graphics::JoinStyle
Constants
- JOIN_STYLES
Public Instance Methods
join_style(style = nil)
click to toggle source
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 throughout the document
# File lib/prawn/graphics/join_style.rb, line 23 def join_style(style = nil) return current_join_style || :miter if style.nil? self.current_join_style = style unless JOIN_STYLES.key?(current_join_style) raise Prawn::Errors::InvalidJoinStyle, "#{style} is not a recognized join style. Valid styles are " + JOIN_STYLES.keys.join(', ') end write_stroke_join_style end
Also aliased as: join_style=
Private Instance Methods
current_join_style()
click to toggle source
# File lib/prawn/graphics/join_style.rb, line 41 def current_join_style graphic_state.join_style end
current_join_style=(style)
click to toggle source
# File lib/prawn/graphics/join_style.rb, line 45 def current_join_style=(style) graphic_state.join_style = style end
write_stroke_join_style()
click to toggle source
# File lib/prawn/graphics/join_style.rb, line 49 def write_stroke_join_style renderer.add_content "#{JOIN_STYLES[current_join_style]} j" end