private class ExtractImages.ImageGraphicsEngine extends PDFGraphicsStreamEngine
Modifier | Constructor and Description |
---|---|
protected |
ImageGraphicsEngine(PDPage page) |
Modifier and Type | Method and Description |
---|---|
void |
appendRectangle(java.awt.geom.Point2D p0,
java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
java.awt.geom.Point2D p3)
Append a rectangle to the current path.
|
void |
clip(int windingRule)
Modify the current clipping path by intersecting it with the current path.
|
void |
closePath()
Closes the current path.
|
void |
curveTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Draws a curve from the current point to (x3,y3) using (x1,y1) and (x2,y2) as control points.
|
void |
drawImage(PDImage pdImage)
Draw the image.
|
void |
endPath()
Ends the current path without filling or stroking it.
|
void |
fillAndStrokePath(int windingRule)
Fills and then strokes the path.
|
void |
fillPath(int windingRule)
Fill the path.
|
java.awt.geom.Point2D |
getCurrentPoint()
Returns the current point of the current path.
|
void |
lineTo(float x,
float y)
Draws a line from the current point to (x,y).
|
void |
moveTo(float x,
float y)
Starts a new path at (x,y).
|
private void |
processColor(PDColor color) |
void |
run() |
void |
shadingFill(COSName shadingName)
Fill with Shading.
|
protected void |
showGlyph(Matrix textRenderingMatrix,
PDFont font,
int code,
java.lang.String unicode,
Vector displacement)
Called when a glyph is to be processed.This method is intended for overriding in subclasses,
the default implementation does nothing.
|
void |
strokePath()
Stroke the path.
|
getPage
addOperator, applyTextAdjustment, beginMarkedContentSequence, beginText, decreaseLevel, endMarkedContentSequence, endText, getAppearance, getCurrentPage, getGraphicsStackSize, getGraphicsState, getInitialMatrix, getLevel, getResources, getTextLineMatrix, getTextMatrix, increaseLevel, operatorException, processAnnotation, processChildStream, processOperator, processOperator, processPage, processSoftMask, processTilingPattern, processTilingPattern, processTransparencyGroup, processType3Stream, registerOperatorProcessor, restoreGraphicsStack, restoreGraphicsState, saveGraphicsStack, saveGraphicsState, setLineDashPattern, setTextLineMatrix, setTextMatrix, showAnnotation, showFontGlyph, showForm, showText, showTextString, showTextStrings, showTransparencyGroup, showType3Glyph, transformedPoint, transformWidth, unsupportedOperator
protected ImageGraphicsEngine(PDPage page)
public void run() throws java.io.IOException
java.io.IOException
public void drawImage(PDImage pdImage) throws java.io.IOException
PDFGraphicsStreamEngine
drawImage
in class PDFGraphicsStreamEngine
pdImage
- The image to draw.java.io.IOException
- if something went wrong.public void appendRectangle(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, java.awt.geom.Point2D p2, java.awt.geom.Point2D p3) throws java.io.IOException
PDFGraphicsStreamEngine
appendRectangle
in class PDFGraphicsStreamEngine
p0
- point P0 of the rectangle.p1
- point P1 of the rectangle.p2
- point P2 of the rectangle.p3
- point P3 of the rectangle.java.io.IOException
- if something went wrong.public void clip(int windingRule) throws java.io.IOException
PDFGraphicsStreamEngine
clip
in class PDFGraphicsStreamEngine
windingRule
- The winding rule which will be used for clipping.java.io.IOException
- if something went wrong.public void moveTo(float x, float y) throws java.io.IOException
PDFGraphicsStreamEngine
moveTo
in class PDFGraphicsStreamEngine
x
- x-coordinate of the target point.y
- y-coordinate of the target point.java.io.IOException
- if something went wrong.public void lineTo(float x, float y) throws java.io.IOException
PDFGraphicsStreamEngine
lineTo
in class PDFGraphicsStreamEngine
x
- x-coordinate of the end point of the line.y
- y-coordinate of the end point of the line.java.io.IOException
- if something went wrong.public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) throws java.io.IOException
PDFGraphicsStreamEngine
curveTo
in class PDFGraphicsStreamEngine
x1
- x-coordinate of the first control point.y1
- y-coordinate of the first control point.x2
- x-coordinate of the second control point.y2
- y-coordinate of the second control point.x3
- x-coordinate of the end point of the curve.y3
- y-coordinate of the end point of the curve.java.io.IOException
- if something went wrong.public java.awt.geom.Point2D getCurrentPoint() throws java.io.IOException
PDFGraphicsStreamEngine
getCurrentPoint
in class PDFGraphicsStreamEngine
java.io.IOException
- if something went wrong.public void closePath() throws java.io.IOException
PDFGraphicsStreamEngine
closePath
in class PDFGraphicsStreamEngine
java.io.IOException
- if something went wrong.public void endPath() throws java.io.IOException
PDFGraphicsStreamEngine
endPath
in class PDFGraphicsStreamEngine
java.io.IOException
- if something went wrong.protected void showGlyph(Matrix textRenderingMatrix, PDFont font, int code, java.lang.String unicode, Vector displacement) throws java.io.IOException
PDFStreamEngine
showGlyph
in class PDFStreamEngine
textRenderingMatrix
- the current text rendering matrix, Trmfont
- the current fontcode
- internal PDF character code for the glyphunicode
- the Unicode text for this glyph, or null if the PDF does provide itdisplacement
- the displacement (i.e. advance) of the glyph in text spacejava.io.IOException
- if the glyph cannot be processedpublic void strokePath() throws java.io.IOException
PDFGraphicsStreamEngine
strokePath
in class PDFGraphicsStreamEngine
java.io.IOException
- If there is an IO error while stroking the path.public void fillPath(int windingRule) throws java.io.IOException
PDFGraphicsStreamEngine
fillPath
in class PDFGraphicsStreamEngine
windingRule
- The winding rule this path will use.java.io.IOException
- if something went wrong.public void fillAndStrokePath(int windingRule) throws java.io.IOException
PDFGraphicsStreamEngine
fillAndStrokePath
in class PDFGraphicsStreamEngine
windingRule
- The winding rule this path will use.java.io.IOException
- if something went wrong.public void shadingFill(COSName shadingName) throws java.io.IOException
PDFGraphicsStreamEngine
shadingFill
in class PDFGraphicsStreamEngine
shadingName
- The name of the Shading Dictionary to use for this fill instruction.java.io.IOException
- if something went wrong.private void processColor(PDColor color) throws java.io.IOException
java.io.IOException