|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.util.PDFStreamEngine
org.pdfbox.pdfviewer.PageDrawer
This will paint a page in a PDF document to a graphics context.
Constructor Summary | |
PageDrawer()
Default constructor, loads properties from file. |
Method Summary | |
void |
drawPage(Graphics g,
PDPage p,
Dimension pageDimension)
This will draw the page to the requested context. |
double |
fixY(double x,
double y)
Fix the y coordinate based on page rotation. |
Graphics2D |
getGraphics()
Get the graphics that we are currently drawing on. |
GeneralPath |
getLinePath()
Get the current line path to be drawn. |
List |
getLineSubPaths()
Get the current list of line paths to be drawn. |
Color |
getNonStrokingColor()
Get the non stroking color. |
PDPage |
getPage()
Get the page that is currently being drawn. |
Dimension |
getPageSize()
Get the size of the page that is currently being drawn. |
Color |
getStrokingColor()
Get the stroking color. |
void |
setLinePath(GeneralPath newLinePath)
Set the line path to draw. |
void |
setLineSubPaths(List newLineSubPaths)
Set the list of line paths to draw. |
void |
setNonStrokingColor(Color newNonStrokingColor)
Set the non stroking color. |
void |
setStrokingColor(Color newStrokingColor)
Set the stroking color. |
protected void |
showCharacter(TextPosition text)
You should override this method if you want to perform an action when a string is being shown. |
Methods inherited from class org.pdfbox.util.PDFStreamEngine |
getColorSpaces, getCurrentPage, getFonts, getGraphicsStack, getGraphicsState, getGraphicsStates, getResources, getTextLineMatrix, getTextMatrix, getXObjects, processOperator, processOperator, processStream, processSubStream, registerOperatorProcessor, resetEngine, setColorSpaces, setFonts, setGraphicsStack, setGraphicsState, setGraphicsStates, setTextLineMatrix, setTextMatrix, showString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PageDrawer() throws IOException
IOException
- If there is an error loading properties from the file.Method Detail |
public void drawPage(Graphics g, PDPage p, Dimension pageDimension) throws IOException
g
- The graphics context to draw onto.p
- The page to draw.pageDimension
- The size of the page to draw.
IOException
- If there is an IO error while drawing the page.protected void showCharacter(TextPosition text)
showCharacter
in class PDFStreamEngine
text
- The string to display.public Graphics2D getGraphics()
public PDPage getPage()
public Dimension getPageSize()
public double fixY(double x, double y)
x
- The x coordinate.y
- The y coordinate.
public GeneralPath getLinePath()
public void setLinePath(GeneralPath newLinePath)
newLinePath
- Set the line path to draw.public List getLineSubPaths()
public void setLineSubPaths(List newLineSubPaths)
newLineSubPaths
- Set the list of line paths to draw.public Color getNonStrokingColor()
public void setNonStrokingColor(Color newNonStrokingColor)
newNonStrokingColor
- The non stroking color.public Color getStrokingColor()
public void setStrokingColor(Color newStrokingColor)
newStrokingColor
- The stroking color.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |