Module: Prawn::Graphics::JoinStyle
- Included in:
- Prawn::Graphics
- Defined in:
- lib/prawn/graphics/join_style.rb
Overview
Implements stroke join styling.
Stable API collapse
-
#join_style ⇒ :miter, ...
#join_style(style) ⇒ void
(also: #join_style=)
Get or set the join style for stroked lines and curves.
Instance Method Details
#join_style ⇒ :miter, ... #join_style(style) ⇒ void Also known as: join_style=
Get or set the join style for stroked lines and curves.
Source Code
lib/prawn/graphics/join_style.rb, line 29
29 | def join_style(style = nil) |
30 | return current_join_style || :miter if style.nil? |
31 | |
32 | self.current_join_style = style |
33 | |
34 | unless JOIN_STYLES.key?(current_join_style) |
35 | raise Prawn::Errors::InvalidJoinStyle, |
36 | "#{style} is not a recognized join style. Valid styles are " + |
37 | JOIN_STYLES.keys.join(', ') |
38 | end
|
39 | |
40 | write_stroke_join_style
|
41 | end
|