code: public void setPatternStroke(PdfPatternPainter p) {
          if (p.isStencil()) {
              setPatternStroke(p, p.getDefaultColor());
              return;
          }
          checkWriter();
          PageResources prs = getPageResources();
          PdfName name = writer.addSimplePattern(p);
          name = prs.addPattern(name, p.getIndirectReference());
          content.append(PdfName.PATTERN.getBytes()).append(" CS ").append(name.getBytes()).append(" SCN").append_i(separator);
      }
docs: Sets the stroke color to a pattern. The pattern can be
  colored or uncolored.
  @param p the pattern