Package com.ribs.pdf
Class Java2DMarkupHandler
- java.lang.Object
- 
- com.ribs.pdf.PDFMarkupHandler
- 
- com.ribs.pdf.Java2DMarkupHandler
 
 
- 
- Direct Known Subclasses:
- BufferedMarkupHandler
 
 public class Java2DMarkupHandler extends PDFMarkupHandler 
- 
- 
Constructor SummaryConstructors Constructor Description Java2DMarkupHandler(java.awt.Graphics2D g)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginPage(float width, float height)Set the bounds of the page.voidclipChanged(PDFGState g)reset the clipvoiddrawImage(PDFGState g, java.awt.Image i, java.awt.geom.AffineTransform ixform)Draw an imagevoidfillPath(PDFGState g, java.awt.geom.GeneralPath p)Fill the current path using the fill params in the gstatejava.awt.font.FontRenderContextgetFontRenderContext()Return an awt FontRenderContext object which will be used to render the fonts.java.awt.GraphicsgetGraphics()Return an awt Graphics object which will be used for suspect purposes.voidsetGraphics(java.awt.Graphics2D g)Set the Graphics2D object that will do all the rendering.voidshowText(PDFGState g, java.awt.font.GlyphVector v)Draw some text at the current text position.voidstrokePath(PDFGState g, java.awt.geom.GeneralPath p)Stroke the current path with the current miter limit, color, etc.voidsun_bug_4723021_workaround(java.awt.Image i, java.awt.geom.AffineTransform ixform)http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4723021
 
- 
- 
- 
Method Detail- 
setGraphicspublic void setGraphics(java.awt.Graphics2D g) Set the Graphics2D object that will do all the rendering.
 - 
getGraphicspublic java.awt.Graphics getGraphics() Description copied from class:PDFMarkupHandlerReturn an awt Graphics object which will be used for suspect purposes. XXX: this is really to help get the FontMetrics for a given font- Specified by:
- getGraphicsin class- PDFMarkupHandler
 
 - 
beginPagepublic void beginPage(float width, float height)Set the bounds of the page. This will be called before any marking operations.- Specified by:
- beginPagein class- PDFMarkupHandler
 
 - 
clipChangedpublic void clipChanged(PDFGState g) reset the clip- Specified by:
- clipChangedin class- PDFMarkupHandler
 
 - 
strokePathpublic void strokePath(PDFGState g, java.awt.geom.GeneralPath p) Stroke the current path with the current miter limit, color, etc.- Specified by:
- strokePathin class- PDFMarkupHandler
 
 - 
fillPathpublic void fillPath(PDFGState g, java.awt.geom.GeneralPath p) Fill the current path using the fill params in the gstate- Specified by:
- fillPathin class- PDFMarkupHandler
 
 - 
drawImagepublic void drawImage(PDFGState g, java.awt.Image i, java.awt.geom.AffineTransform ixform) Draw an image- Specified by:
- drawImagein class- PDFMarkupHandler
 
 - 
sun_bug_4723021_workaroundpublic void sun_bug_4723021_workaround(java.awt.Image i, java.awt.geom.AffineTransform ixform)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. 
 - 
showTextpublic void showText(PDFGState g, java.awt.font.GlyphVector v) 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:
- showTextin class- PDFMarkupHandler
 
 - 
getFontRenderContextpublic java.awt.font.FontRenderContext getFontRenderContext() Description copied from class:PDFMarkupHandlerReturn an awt FontRenderContext object which will be used to render the fonts. The same rendercontext is used for the entire page.- Specified by:
- getFontRenderContextin class- PDFMarkupHandler
 
 
- 
 
-