/** * Paints a shading object and adds it to the resources of this canvas * * @param shading * @return current canvas. */ public PdfCanvas paintShading(PdfShading shading) { PdfName shadingName = resources.addShading(shading); contentStream.getOutputStream().write((PdfObject) shadingName).writeSpace().writeBytes(sh); return this; }