Class Java2DMarkupHandler
java.lang.Object
com.inductiveautomation.rm.pdf.reader.PDFMarkupHandler
com.inductiveautomation.rm.pdf.reader.Java2DMarkupHandler
- Direct Known Subclasses:
BufferedMarkupHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginPage
(float width, float height) Set the bounds of the page.void
reset the clipvoid
drawImage
(PDFGState g, Image i, AffineTransform ixform) Draw an imagevoid
void
endPage()
Restore Graphics2D to the state it was in before we started.void
fillPath
(PDFGState g, GeneralPath p) Fill the current path using the fill params in the gstateReturn an awt FontRenderContext object which will be used to render the fonts.Return an awt Graphics object which will be used for suspect purposes.void
Set the bounds in the Graphics2D's coordinate system where the page will be drawn.void
Set the Graphics2D object that will do all the rendering.void
showText
(PDFGState g, GlyphVector v) Draw some text at the current text position.void
strokePath
(PDFGState g, GeneralPath p) Stroke the current path with the current miter limit, color, etc.void
sun_bug_4723021_workaround
(Image i, AffineTransform ixform) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4723021
-
Constructor Details
-
Java2DMarkupHandler
-
-
Method Details
-
setGraphics
Set the Graphics2D object that will do all the rendering. -
getGraphics
Description copied from class:PDFMarkupHandler
Return an awt Graphics object which will be used for suspect purposes. TODO: this is really to help get the FontMetrics for a given font- Specified by:
getGraphics
in classPDFMarkupHandler
-
setDestinationRect
Set the bounds in the Graphics2D's coordinate system where the page will be drawn. -
beginPage
public void beginPage(float width, float height) Set the bounds of the page. This will be called before any marking operations.- Specified by:
beginPage
in classPDFMarkupHandler
-
endPage
public void endPage()Restore Graphics2D to the state it was in before we started.- Overrides:
endPage
in classPDFMarkupHandler
-
clipChanged
reset the clip- Specified by:
clipChanged
in classPDFMarkupHandler
-
strokePath
Stroke the current path with the current miter limit, color, etc.- Specified by:
strokePath
in classPDFMarkupHandler
-
fillPath
Fill the current path using the fill params in the gstate- Specified by:
fillPath
in classPDFMarkupHandler
-
drawImage
Draw an image- Specified by:
drawImage
in classPDFMarkupHandler
-
drawTiledImage
-
sun_bug_4723021_workaround
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4723021Applying a transform to an image with interesting SampleModels fails. To work around this, we try creating an untransformed RGBA image first and then redrawing that with the desired transform.
-
showText
Draw some text at the current text position. The glyphVector will have been created by the parser using the current font and its character encodings.- Specified by:
showText
in classPDFMarkupHandler
-
getFontRenderContext
Description copied from class:PDFMarkupHandler
Return an awt FontRenderContext object which will be used to render the fonts. The same rendercontext is used for the entire page.- Specified by:
getFontRenderContext
in classPDFMarkupHandler
-