Parent

Prawn::GraphicStateStack

Attributes

stack[RW]

Public Class Methods

new(previous_state = nil) click to toggle source
    # File lib/prawn/document/graphics_state.rb, line 14
14:     def initialize(previous_state = nil)
15:       self.stack = [GraphicState.new(previous_state)]
16:     end

Public Instance Methods

current_state() click to toggle source
    # File lib/prawn/document/graphics_state.rb, line 30
30:     def current_state
31:       stack.last
32:     end
empty?() click to toggle source
    # File lib/prawn/document/graphics_state.rb, line 38
38:     def empty?
39:       stack.empty?
40:     end
present?() click to toggle source
    # File lib/prawn/document/graphics_state.rb, line 34
34:     def present?
35:       stack.size > 0
36:     end
restore_graphic_state() click to toggle source
    # File lib/prawn/document/graphics_state.rb, line 22
22:     def restore_graphic_state
23:       if stack.empty?
24:         raise Prawn::Errors::EmptyGraphicStateStack, 
25:           "\n You have reached the end of the graphic state stack" 
26:       end
27:       stack.pop
28:     end
save_graphic_state(graphic_state = nil) click to toggle source
    # File lib/prawn/document/graphics_state.rb, line 18
18:     def save_graphic_state(graphic_state = nil)
19:       stack.push(GraphicState.new(graphic_state || current_state))
20:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.