Module: Prawn::Graphics::CapStyle

Included in:
Prawn::Graphics
Defined in:
lib/prawn/graphics/cap_style.rb

Overview

Implements stroke cap styling

Stable API collapse

Instance Method Details

#cap_style(style) ⇒ void #cap_styleSymbol Also known as: cap_style=

Sets the cap style for stroked lines and curves.

Overloads:

  • #cap_style(style) ⇒ void

    This method returns an undefined value.

    Parameters:

    • style (:butt, :round, :projecting_square)

      (:butt)

  • #cap_styleSymbol

    Returns:

    • (Symbol)
Source Code
lib/prawn/graphics/cap_style.rb, line 19
19
def cap_style(style = nil)
20
  return current_cap_style || :butt if style.nil?
21
22
  self.current_cap_style = style
23
24
  write_stroke_cap_style
25
end