Class PDFGraphicsStreamEngine
- java.lang.Object
-
- com.tom_roush.pdfbox.contentstream.PDFStreamEngine
-
- com.tom_roush.pdfbox.contentstream.PDFGraphicsStreamEngine
-
- Direct Known Subclasses:
PageDrawer
public abstract class PDFGraphicsStreamEngine extends PDFStreamEngine
PDFStreamEngine subclass for advanced processing of graphics. This class should be subclasses by end users looking to hook into graphics operations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPDFGraphicsStreamEngine(PDPage page)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidappendRectangle(android.graphics.PointF p0, android.graphics.PointF p1, android.graphics.PointF p2, android.graphics.PointF p3)Append a rectangle to the current path.abstract voidclip(android.graphics.Path.FillType windingRule)Modify the current clipping path by intersecting it with the current path.abstract voidclosePath()Closes the current path.abstract voidcurveTo(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.abstract voiddrawImage(PDImage pdImage)Draw the image.abstract voidendPath()Ends the current path without filling or stroking it.abstract voidfillAndStrokePath(android.graphics.Path.FillType windingRule)Fills and then strokes the path.abstract voidfillPath(android.graphics.Path.FillType windingRule)Fill the path.abstract android.graphics.PointFgetCurrentPoint()Returns the current point of the current path.protected PDPagegetPage()Returns the page.abstract voidlineTo(float x, float y)Draws a line from the current point to (x,y).abstract voidmoveTo(float x, float y)Starts a new path at (x,y).abstract voidshadingFill(COSName shadingName)Fill with Shading.abstract voidstrokePath()Stroke the path.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.contentstream.PDFStreamEngine
addOperator, applyTextAdjustment, beginText, endText, getAppearance, getCurrentPage, getGraphicsStackSize, getGraphicsState, getInitialMatrix, getResources, getTextLineMatrix, getTextMatrix, operatorException, processAnnotation, processChildStream, processOperator, processOperator, processPage, processSoftMask, processTilingPattern, processTilingPattern, processTransparencyGroup, processType3Stream, registerOperatorProcessor, restoreGraphicsStack, restoreGraphicsState, saveGraphicsStack, saveGraphicsState, setLineDashPattern, setTextLineMatrix, setTextMatrix, showAnnotation, showFontGlyph, showForm, showGlyph, showText, showTextString, showTextStrings, showTransparencyGroup, showType3Glyph, transformedPoint, transformWidth, unsupportedOperator
-
-
-
-
Constructor Detail
-
PDFGraphicsStreamEngine
protected PDFGraphicsStreamEngine(PDPage page)
Constructor.
-
-
Method Detail
-
getPage
protected final PDPage getPage()
Returns the page.
-
appendRectangle
public abstract void appendRectangle(android.graphics.PointF p0, android.graphics.PointF p1, android.graphics.PointF p2, android.graphics.PointF p3) throws IOExceptionAppend a rectangle to the current path.- Throws:
IOException
-
drawImage
public abstract void drawImage(PDImage pdImage) throws IOException
Draw the image.- Parameters:
pdImage- The image to draw.- Throws:
IOException
-
clip
public abstract void clip(android.graphics.Path.FillType windingRule) throws IOExceptionModify the current clipping path by intersecting it with the current path. The clipping path will not be updated until the succeeding painting operator is called.- Parameters:
windingRule- The winding rule which will be used for clipping.- Throws:
IOException
-
moveTo
public abstract void moveTo(float x, float y) throws IOExceptionStarts a new path at (x,y).- Throws:
IOException
-
lineTo
public abstract void lineTo(float x, float y) throws IOExceptionDraws a line from the current point to (x,y).- Throws:
IOException
-
curveTo
public abstract void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) throws IOExceptionDraws a curve from the current point to (x3,y3) using (x1,y1) and (x2,y2) as control points.- Throws:
IOException
-
getCurrentPoint
public abstract android.graphics.PointF getCurrentPoint() throws IOExceptionReturns the current point of the current path.- Throws:
IOException
-
closePath
public abstract void closePath() throws IOExceptionCloses the current path.- Throws:
IOException
-
endPath
public abstract void endPath() throws IOExceptionEnds the current path without filling or stroking it. The clipping path is updated here.- Throws:
IOException
-
strokePath
public abstract void strokePath() throws IOExceptionStroke the path.- Throws:
IOException- If there is an IO error while stroking the path.
-
fillPath
public abstract void fillPath(android.graphics.Path.FillType windingRule) throws IOExceptionFill the path.- Parameters:
windingRule- The winding rule this path will use.- Throws:
IOException
-
fillAndStrokePath
public abstract void fillAndStrokePath(android.graphics.Path.FillType windingRule) throws IOExceptionFills and then strokes the path.- Parameters:
windingRule- The winding rule this path will use.- Throws:
IOException
-
shadingFill
public abstract void shadingFill(COSName shadingName) throws IOException
Fill with Shading.- Parameters:
shadingName- The name of the Shading Dictionary to use for this fill instruction.- Throws:
IOException
-
-