code: public void saveGraphicsState () throws IOException
    {
      if (!fontStack.isEmpty ())
      {
        fontStack.push (fontStack.peek ());
      }
      if (!strokingColorSpaceStack.isEmpty ())
      {
        strokingColorSpaceStack.push (strokingColorSpaceStack.peek ());
      }
      if (!nonStrokingColorSpaceStack.isEmpty ())
      {
        nonStrokingColorSpaceStack.push (nonStrokingColorSpaceStack.peek ());
      }
      writeOperator ((byte) 'q');
    }
docs: q operator. Saves the current graphics state.
  
  @throws IOException
  If an error occurs while writing to the stream.