/** * Fills the path, using the even-odd rule to determine the region to fill and strokes it. */ public void eoFillStroke() { content.append("B*").append_i(separator); }
/** * Changes the current gray tint for stroking paths to black. */ public void resetGrayStroke() { content.append("0 G").append_i(separator); }
/** * Ends the path without filling or stroking it. */ public void newPath() { content.append("n").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() { content.append("b*").append_i(separator); }
/** * Ends the path without filling or stroking it. */ public void newPath() { content.append("n").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() { content.append("b").append_i(separator); }
/** * Moves to the start of the next line. */ public void newlineText() { state.yTLM -= state.leading; content.append("T*").append_i(separator); }
/** * Saves the graphic state. <CODE>saveState</CODE> and * <CODE>restoreState</CODE> must be balanced. */ public void saveState() { 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() { 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 = (GraphicState)stateList.get(idx); stateList.remove(idx); }
/** * Changes the currentgray tint for filling paths (device dependent colors!). * <P> * Sets the color space to <B>DeviceGray</B> (or the <B>DefaultGray</B> color space), * and sets the gray tint to use for filling paths.</P> * * @param gray a value between 0 (black) and 1 (white) */ public void setGrayFill(float gray) { content.append(gray).append(" g").append_i(separator); }
/** * Sets the text rise parameter. * <P> * This allows to write text in subscript or superscript mode.</P> * * @param rise a parameter */ public void setTextRise(float rise) { content.append(rise).append(" Ts").append_i(separator); }
/** * Shows the <CODE>text</CODE>. * * @param text the text to write */ public void showText(String text) { showText2(text); content.append("Tj").append_i(separator); }
/** * Changes the currentgray tint for filling paths (device dependent colors!). * <P> * Sets the color space to <B>DeviceGray</B> (or the <B>DefaultGray</B> color space), * and sets the gray tint to use for filling paths.</P> * * @param gray a value between 0 (black) and 1 (white) */ public void setGrayFill(float gray) { content.append(gray).append(" g").append_i(separator); }
/** * Changes the currentgray tint for filling paths (device dependent colors!). * <P> * Sets the color space to <B>DeviceGray</B> (or the <B>DefaultGray</B> color space), * and sets the gray tint to use for filling paths.</P> * * @param gray a value between 0 (black) and 1 (white) */ public void setGrayFill(float gray) { content.append(gray).append(" g").append_i(separator); }
/** * Ends the writing of text and makes the current font invalid. */ public void endText() { if (!inText) { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.begin.end.text.operators")); } inText = false; content.append("ET").append_i(separator); }
/** * Ends a marked content sequence */ public void endMarkedContentSequence() { if (mcDepth == 0) { throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.begin.end.marked.content.operators")); } --mcDepth; content.append("EMC").append_i(separator); }
/** Sets the graphic state * @param gstate the graphic state */ public void setGState(PdfGState gstate) { PdfObject[] obj = writer.addSimpleExtGState(gstate); PageResources prs = getPageResources(); PdfName name = prs.addExtGState((PdfName)obj[0], (PdfIndirectReference)obj[1]); content.append(name.getBytes()).append(" gs").append_i(separator); }
/** * Appends a Bêzier curve to the path, starting from the current point. * * @param x1 x-coordinate of the first control point * @param y1 y-coordinate of the first control point * @param x3 x-coordinate of the ending point (= new current point) * @param y3 y-coordinate of the ending point (= new current point) */ public void curveFromTo(float x1, float y1, float x3, float y3) { content.append(x1).append(' ').append(y1).append(' ').append(x3).append(' ').append(y3).append(" y").append_i(separator); }
/** * Appends a Bêzier curve to the path, starting from the current point. * * @param x2 x-coordinate of the second control point * @param y2 y-coordinate of the second control point * @param x3 x-coordinate of the ending point (= new current point) * @param y3 y-coordinate of the ending point (= new current point) */ public void curveTo(float x2, float y2, float x3, float y3) { content.append(x2).append(' ').append(y2).append(' ').append(x3).append(' ').append(y3).append(" v").append_i(separator); }
/** * Appends a Bêzier curve to the path, starting from the current point. * * @param x1 x-coordinate of the first control point * @param y1 y-coordinate of the first control point * @param x3 x-coordinate of the ending point (= new current point) * @param y3 y-coordinate of the ending point (= new current point) */ public void curveFromTo(float x1, float y1, float x3, float y3) { content.append(x1).append(' ').append(y1).append(' ').append(x3).append(' ').append(y3).append(" y").append_i(separator); }