If you want to do custom graphics processing rather than Graphics2D rendering, then you should
subclass PDFGraphicsStreamEngine instead. Subclassing PageDrawer is only suitable for
cases where the goal is to render onto a Graphics2D surface. In that case you'll also
have to subclass PDFRenderer and override
PDFRenderer#createPageDrawer(PageDrawerParameters). See the OpaquePDFRenderer.java
example in the source code download on how to do this.
| Modifier and Type | Class and Description |
|---|---|
| private class | PageDrawer.
Transparency group. |
| Modifier and Type | Field and Description |
|---|---|
| private AnnotationFilter | annotationFilter
Default annotations filter, returns all annotations |
| private final Map | |
| private int | |
| private final RenderDestination | |
| private boolean | |
| private final Map | |
| private Graphics2D | |
| private final float | |
| private Shape | |
| private LookupTable | |
| private static final boolean | |
| private static final boolean | |
| private List | |
| private GeneralPath | |
| private static final Log | |
| private int | |
| private static final String | |
| private PDRectangle | |
| private final PDFRenderer | |
| private final RenderingHints | |
| private final boolean | |
| private List | |
| private final TilingPaintFactory | |
| private final Deque | |
| private AffineTransform | |
| private float | |
| private float |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private GeneralPath | adjustClip(GeneralPath linePath)
PDFBOX-5715 / PR#73: This was added to fix a problem with missing fine lines when printing on MacOS. |
| private BufferedImage | |
| public void | appendRectangle(Point2D
starting coordinate of the rectangle p0, Point2D second coordinate of the rectangle p1, Point2D third coordinate of the rectangle p2, Point2D last coordinate of the rectangle p3)Implements abstract org. Append a rectangle to the current path. |
| private Paint | |
| private BufferedImage | |
| public void | beginMarkedContentSequence(COSName
indicates the role or significance of the sequence tag, COSDictionary optional properties properties)Overrides org. Called when a marked content group begins |
| public void | beginText()
Overrides org. Called when the BT operator is encountered. |
| private void | |
| private float | |
| public void | clip(int
The winding rule which will be used for clipping. windingRule)Implements abstract org. Modify the current clipping path by intersecting it with the current path. |
| public void | closePath()
Implements abstract org. Closes the current path. |
| public void | curveTo(float
the X coordinate of the first Bézier control point x1, float the Y coordinate of the first Bézier control point y1, float the X coordinate of the second Bézier control point x2, float the Y coordinate of the second Bézier control point y2, float the X coordinate of the final end point x3, float the Y coordinate of the final end point y3)Implements abstract org. Draws a curve from the current point to (x3,y3) using (x1,y1) and (x2,y2) as control points. |
| private void | |
| private void | drawGlyph(GeneralPath
the GeneralPath for the glyph path, PDFont the font font, int character code code, Vector the glyph's displacement (advance) displacement, AffineTransform the transformation at)Renders a glyph. |
| public void | drawImage(PDImage
The image to draw. pdImage)Implements abstract org. Draw the image. |
| public void | drawPage(Graphics2D
The graphics context to draw onto. g, PDRectangle The size of the page to draw. pageSize)Draws the page to the requested context. |
| pack-priv void | drawTilingPattern(Graphics2D
The graphics context to draw onto. g, PDTilingPattern The tiling pattern to be used. pattern, PDColorSpace color space for this tiling. colorSpace, PDColor color for this tiling. color, Matrix the pattern matrix patternMatrix)Draws the pattern stream to the requested context. |
| public void | endMarkedContentSequence()
Overrides org. Called when a marked content group ends |
| public void | endPath()
Implements abstract org. Ends the current path without filling or stroking it. |
| public void | endText()
Overrides org. Called when the ET operator is encountered. |
| private void | |
| public void | fillAndStrokePath(int
The winding rule this path will use. windingRule)Implements abstract org. Fills and then strokes the path. |
| public void | fillPath(int
The winding rule this path will use. windingRule)Implements abstract org. Fill the path. |
| public AnnotationFilter | |
| public Point2D | getCurrentPoint()
Implements abstract org. Returns the current point of the current path. |
| private float[] | |
| protected final Graphics2D | |
| private LookupTable | |
| protected final GeneralPath | |
| protected final Paint | |
| protected Paint | |
| public final PDFRenderer | |
| private Stroke | |
| private Paint | |
| protected int | Returns: The rounded-down ratio of image pixels to drawn pixels. Returned value will always be >=1.PDImage to be drawn pdImage, AffineTransform Transform that will be applied to the image when drawing at)Calculates the subsampling frequency for a given PDImage based on the current transformation and its calculated transform. |
| private boolean | |
| private void | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| public void | lineTo(float
the X-coordinate of the ending-point of the line to be drawn x, float the Y-coordinate of the ending-point of the line to be drawn y)Implements abstract org. Draws a line from the current point to (x,y). |
| public void | moveTo(float
the x-coordinate to move to x, float the y-coordinate to move to y)Implements abstract org. Starts a new path at (x,y). |
| public void | |
| protected final void | |
| private void | |
| public void | shadingFill(COSName
The name of the Shading Dictionary to use for this fill instruction. shadingName)Implements abstract org. Fill with Shading. |
| public void | showAnnotation(PDAnnotation
An annotation on the current page. annotation)Overrides org. Shows the given annotation. |
| protected void | showFontGlyph(Matrix
the current text rendering matrix, Trm textRenderingMatrix, PDFont the current font font, int internal PDF character code for the glyph code, Vector the displacement (i.e. advance) of the glyph in text space displacement)Overrides org. Called when a glyph is to be processed. |
| public void | showForm(PDFormXObject
form XObject form)Overrides org. Shows a form from the content stream. |
| public void | showTransparencyGroup(PDTransparencyGroup
transparency group (form) XObject form)Overrides org. Shows a transparency group from the content stream. |
| protected void | showTransparencyGroupOnGraphics(PDTransparencyGroup
the transparency group to be extracted form, Graphics2D the target graphics device graphics)For advanced users, to extract the transparency group into a separate graphics device. |
| protected void | showType3Glyph(Matrix
the current text rendering matrix, Trm textRenderingMatrix, PDType3Font the current font font, int internal PDF character code for the glyph code, Vector the displacement (i.e. advance) of the glyph in text space displacement)Overrides org. Called when a glyph is to be processed. |
| public void | strokePath()
Implements abstract org. Stroke the path. |
| protected void |