Module: Prawn::Graphics::CapStyle

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

Constant Summary

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) cap_style(style = nil) 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 current_cap_style || :butt if style.nil?

  self.current_cap_style = style

  write_stroke_cap_style
end