Module: Prawn::Graphics::CapStyle
- Included in:
- Prawn::Graphics
- Defined in:
- lib/prawn/graphics/cap_style.rb
Constant Summary collapse
- CAP_STYLES =
{ :butt => 0, :round => 1, :projecting_square => 2 }
Instance Method Summary collapse
-
#cap_style(style = nil) ⇒ Object
(also: #cap_style=)
Sets the cap style for stroked lines and curves.
Instance Method Details
#cap_style(style = nil) ⇒ Object Also known as: cap_style=
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.
21 22 23 24 25 26 27 |
# File 'lib/prawn/graphics/cap_style.rb', line 21 def cap_style(style=nil) return @cap_style || :butt if style.nil? @cap_style = style write_stroke_cap_style end |