/** * Modify the current clipping path by intersecting it with the current path, using the * even-odd rule to determine which regions lie inside the clipping path. */ public void eoClip() { if (inText && isTagged()) { endText(); } content.append("W*").append_i(separator); }
/** * Modify the current clipping path by intersecting it with the current path, using the * nonzero winding number rule to determine which regions lie inside the clipping * path. */ public void clip() { if (inText && isTagged()) { endText(); } content.append("W").append_i(separator); }
/** * Modify the current clipping path by intersecting it with the current path, using the * even-odd rule to determine which regions lie inside the clipping path. */ public void eoClip() { if (inText && isTagged()) { endText(); } content.append("W*").append_i(separator); }
/** * Modify the current clipping path by intersecting it with the current path, using the * nonzero winding number rule to determine which regions lie inside the clipping * path. */ public void clip() { if (inText && isTagged()) { endText(); } content.append("W").append_i(separator); }
/** * Saves the graphic state. <CODE>saveState</CODE> and * <CODE>restoreState</CODE> must be balanced. */ public void saveState() { PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_CANVAS, "q"); if (inText && isTagged()) { endText(); } content.append("q").append_i(separator); stateList.add(new GraphicState(state)); }
/** * Saves the graphic state. <CODE>saveState</CODE> and * <CODE>restoreState</CODE> must be balanced. */ public void saveState() { PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_CANVAS, "q"); if (inText && isTagged()) { endText(); } content.append("q").append_i(separator); stateList.add(new GraphicState(state)); }
/** * Restores the graphic state. <CODE>saveState</CODE> and * <CODE>restoreState</CODE> must be balanced. */ public void restoreState() { PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_CANVAS, "Q"); if (inText && isTagged()) { endText(); } content.append("Q").append_i(separator); int idx = stateList.size() - 1; if (idx < 0) throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.save.restore.state.operators")); state.restore(stateList.get(idx)); stateList.remove(idx); }
/** * Ends the path without filling or stroking it. */ public void newPath() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } content.append("n").append_i(separator); }
/** * Ends the path without filling or stroking it. */ public void newPath() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } content.append("n").append_i(separator); }
/** * Closes the current subpath by appending a straight line segment from the current point * to the starting point of the subpath. */ public void closePath() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } content.append("h").append_i(separator); }
/** * Closes the current subpath by appending a straight line segment from the current point * to the starting point of the subpath. */ public void closePath() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } content.append("h").append_i(separator); }
/** * Fills the path, using the even-odd rule to determine the region to fill. */ public void eoFill() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState); content.append("f*").append_i(separator); }
/** * Fills the path, using the non-zero winding number rule to determine the region to fill. */ public void fill() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState); content.append("f").append_i(separator); }
/** * Closes the path and strokes it. */ public void closePathStroke() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState); content.append("s").append_i(separator); }
/** * Strokes the path. */ public void stroke() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState); content.append("S").append_i(separator); }
/** * Fills the path, using the even-odd rule to determine the region to fill. */ public void eoFill() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState); content.append("f*").append_i(separator); }
/** * Closes the path, fills it using the non-zero winding number rule to determine the region to fill and strokes it. */ public void closePathFillStroke() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState); content.append("b").append_i(separator); }
/** * Closes the path, fills it using the even-odd rule to determine the region to fill and strokes it. */ public void closePathEoFillStroke() { if (inText) { if (isTagged()) { endText(); } else { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object")); } } PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke); PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState); content.append("b*").append_i(separator); }
/** * Adds a PostScript XObject to this content. * * @param psobject the object */ public void addPSXObject(final PdfPSXObject psobject) { if (inText && isTagged()) { endText(); } checkWriter(); PdfName name = writer.addDirectTemplateSimple(psobject, null); PageResources prs = getPageResources(); name = prs.addXObject(name, psobject.getIndirectReference()); content.append(name.getBytes()).append(" Do").append_i(separator); }
/** Concatenates a transformation to the current transformation * matrix. * @param af the transformation */ public void transform(final AffineTransform af) { if (inText && isTagged()) { endText(); } double matrix[] = new double[6]; af.getMatrix(matrix); state.CTM.concatenate(af); content.append(matrix[0]).append(' ').append(matrix[1]).append(' ').append(matrix[2]).append(' '); content.append(matrix[3]).append(' ').append(matrix[4]).append(' ').append(matrix[5]).append(" cm").append_i(separator); }