/** * Sets the ExtGState dictionary for the current graphics state * * @param extGState a dictionary that maps resource names to graphics state parameter dictionaries * @return current canvas. */ public PdfCanvas setExtGState(PdfExtGState extGState) { if (!extGState.isFlushed()) currentGs.updateFromExtGState(extGState, document); PdfName name = resources.addExtGState(extGState); contentStream.getOutputStream().write(name).writeSpace().writeBytes(gs); document.checkIsoConformance(currentGs, IsoKey.EXTENDED_GRAPHICS_STATE); return this; }