# File lib/pdf/writer.rb, line 1721
1721:   def restore_state
1722:     unless @state_stack.empty?
1723:       state = @state_stack.pop
1724:       @current_fill_color         = state.fill_color
1725:       @current_stroke_color       = state.stroke_color
1726:       @current_text_render_style  = state.text_render_style
1727:       @current_stroke_style       = state.stroke_style
1728:       stroke_style!
1729:     end
1730:     add_content("\nQ")
1731:   end