code: public void addRect (final float x, final float y, final float width, final float height) throws IOException
    {
      if (inTextMode)
      {
        throw new IllegalStateException ("Error: addRect is not allowed within a text block.");
      }
      writeOperand (x);
      writeOperand (y);
      writeOperand (width);
      writeOperand (height);
      writeOperator ((byte) 'r', (byte) 'e');
    }
docs: Add a rectangle to the current path.
  
  @param x
  The lower left x coordinate.
  @param y
  The lower left y coordinate.
  @param width
  The width of the rectangle.
  @param height
  The height of the rectangle.
  @throws IOException
  If the content stream could not be written.
  @throws IllegalStateException
  If the method was called within a text block.