code: public PdfPatternPainter createPattern(float width, float height, float xstep, float ystep, Color color) {
          checkWriter();
          if ( xstep == 0.0f || ystep == 0.0f )
              throw new RuntimeException("XStep or YStep can not be ZERO.");
          PdfPatternPainter painter = new PdfPatternPainter(writer, color);
          painter.setWidth(width);
          painter.setHeight(height);
          painter.setXStep(xstep);
          painter.setYStep(ystep);
          writer.addSimplePattern(painter);
          return painter;
      }
docs: Create a new uncolored tiling pattern.
  
  @param width the width of the pattern
  @param height the height of the pattern
  @param xstep the desired horizontal spacing between pattern cells.
  May be either positive or negative, but not zero.
  @param ystep the desired vertical spacing between pattern cells.
  May be either positive or negative, but not zero.
  @param color the default color. Can be <CODE>null</CODE>
  @return the <CODE>PdfPatternPainter</CODE> where the pattern will be created