Module: Prawn::Graphics::CapStyle

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

Constant Summary collapse

CAP_STYLES =

Sets the cap_style for stroked lines and curves

{ :butt => 0, :round => 1, :projecting_square => 2 }

Instance Method Summary collapse

Instance Method Details

#cap_style(style = nil) ⇒ Object Also known as: cap_style=

style is one of :butt, :round, or :projecting_square


18
19
20
21
22
23
24
# File 'lib/prawn/graphics/cap_style.rb', line 18

def cap_style(style=nil)
  return @cap_style || :butt if style.nil?

  @cap_style = style

  write_stroke_cap_style
end