code: public void shadingFill (final PDShading shading) throws IOException
    {
      if (inTextMode)
      {
        throw new IllegalStateException ("Error: shadingFill is not allowed within a text block.");
      }
  
      writeOperand (resources.add (shading));
      writeOperator ((byte) 's', (byte) 'h');
    }
docs: Fills the clipping area with the given shading.
  
  @param shading
  Shading resource
  @throws IOException
  If the content stream could not be written
  @throws IllegalStateException
  If the method was called within a text block.