public class Java2DMarkupHandler extends PDFMarkupHandler
Constructor and Description |
---|
Java2DMarkupHandler(java.awt.Graphics2D g) |
Modifier and Type | Method and Description |
---|---|
void |
beginPage(float width,
float height)
Set the bounds of the page.
|
void |
clipChanged(PDFGState g)
reset the clip
|
void |
drawImage(PDFGState g,
java.awt.Image i,
java.awt.geom.AffineTransform ixform)
Draw an image
|
void |
drawTiledImage(PDFTiledImage.TiledImageProxy i,
java.awt.geom.AffineTransform ixform) |
void |
endPage()
Restore Graphics2D to the state it was in before we started.
|
void |
fillPath(PDFGState g,
java.awt.geom.GeneralPath p)
Fill the current path using the fill params in the gstate
|
java.awt.font.FontRenderContext |
getFontRenderContext()
Return an awt FontRenderContext object which will be used to render the fonts.
|
java.awt.Graphics |
getGraphics()
Return an awt Graphics object which will be used for suspect purposes.
|
void |
setDestinationRect(java.awt.geom.Rectangle2D r)
Set the bounds in the Graphics2D's coordinate system where the page will be drawn.
|
void |
setGraphics(java.awt.Graphics2D g)
Set the Graphics2D object that will do all the rendering.
|
void |
showText(PDFGState g,
java.awt.font.GlyphVector v)
Draw some text at the current text position.
|
void |
strokePath(PDFGState g,
java.awt.geom.GeneralPath p)
Stroke the current path with the current miter limit, color, etc.
|
void |
sun_bug_4723021_workaround(java.awt.Image i,
java.awt.geom.AffineTransform ixform)
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4723021
|
public void setGraphics(java.awt.Graphics2D g)
public java.awt.Graphics getGraphics()
PDFMarkupHandler
getGraphics
in class PDFMarkupHandler
public void setDestinationRect(java.awt.geom.Rectangle2D r)
public void beginPage(float width, float height)
beginPage
in class PDFMarkupHandler
public void endPage()
endPage
in class PDFMarkupHandler
public void clipChanged(PDFGState g)
clipChanged
in class PDFMarkupHandler
public void strokePath(PDFGState g, java.awt.geom.GeneralPath p)
strokePath
in class PDFMarkupHandler
public void fillPath(PDFGState g, java.awt.geom.GeneralPath p)
fillPath
in class PDFMarkupHandler
public void drawImage(PDFGState g, java.awt.Image i, java.awt.geom.AffineTransform ixform)
drawImage
in class PDFMarkupHandler
public void drawTiledImage(PDFTiledImage.TiledImageProxy i, java.awt.geom.AffineTransform ixform)
public void sun_bug_4723021_workaround(java.awt.Image i, java.awt.geom.AffineTransform ixform)
Applying 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.
public void showText(PDFGState g, java.awt.font.GlyphVector v)
showText
in class PDFMarkupHandler
public java.awt.font.FontRenderContext getFontRenderContext()
PDFMarkupHandler
getFontRenderContext
in class PDFMarkupHandler