Prawn::Graphics::CapStyle

Constants

CAP_STYLES

Public Instance Methods

cap_style(style=nil) click to toggle source

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.

    # File lib/prawn/graphics/cap_style.rb, line 21
21:       def cap_style(style=nil)
22:         return current_cap_style || :butt if style.nil?
23: 
24:         self.current_cap_style = style
25: 
26:         write_stroke_cap_style
27:       end
Also aliased as: cap_style=
cap_style=(style=nil) click to toggle source
Alias for: cap_style

Private Instance Methods

current_cap_style() click to toggle source
    # File lib/prawn/graphics/cap_style.rb, line 33
33:       def current_cap_style  
34:         graphic_state.cap_style
35:       end
current_cap_style=(style) click to toggle source
    # File lib/prawn/graphics/cap_style.rb, line 37
37:       def current_cap_style=(style)  
38:         graphic_state.cap_style = style
39:       end
write_stroke_cap_style() click to toggle source
    # File lib/prawn/graphics/cap_style.rb, line 41
41:       def write_stroke_cap_style
42:         add_content "#{CAP_STYLES[current_cap_style]} J"
43:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.