Package de.rototor.pdfbox.graphics2d
Interface IPdfBoxGraphics2DFontTextDrawer.IFontTextDrawerEnv
-
- Enclosing interface:
- IPdfBoxGraphics2DFontTextDrawer
public static interface IPdfBoxGraphics2DFontTextDrawer.IFontTextDrawerEnvEnviroment for font based drawing of text
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyPaint(java.awt.Paint paint, java.awt.Shape shapeToDraw)Apply the given paint on the current content streamvoidapplyStroke(java.awt.Stroke stroke)Apply this stroke on the current content streamjava.awt.Graphics2DgetCalculationGraphics()org.apache.pdfbox.pdmodel.PDPageContentStreamgetContentStream()java.awt.geom.AffineTransformgetCurrentEffectiveTransform()org.apache.pdfbox.pdmodel.PDDocumentgetDocument()java.awt.FontgetFont()java.awt.font.FontRenderContextgetFontRenderContext()org.apache.pdfbox.pdmodel.common.PDRectanglegetGraphicsBBox()java.awt.PaintgetPaint()org.apache.pdfbox.pdmodel.PDResourcesgetResources()
-
-
-
Method Detail
-
getDocument
org.apache.pdfbox.pdmodel.PDDocument getDocument()
- Returns:
- the document we are writing to
-
getContentStream
org.apache.pdfbox.pdmodel.PDPageContentStream getContentStream()
- Returns:
- the content stream
-
getFont
java.awt.Font getFont()
- Returns:
- the current font set on the graphics. This is the "default" font to
use when no other font is set on the
AttributedCharacterIterator.
-
getPaint
java.awt.Paint getPaint()
- Returns:
- the current paint set on the graphics. This is the "default" paint
when no other paint is set on on the
AttributedCharacterIterator.
-
applyPaint
void applyPaint(java.awt.Paint paint, java.awt.Shape shapeToDraw) throws java.io.IOExceptionApply the given paint on the current content stream- Parameters:
paint- Paint to applyshapeToDraw- the shape to draw of the text, if known. This is needed to calculate correct gradients.- Throws:
java.io.IOException- if an IO error occurs when writing the paint to the content stream.
-
getFontRenderContext
java.awt.font.FontRenderContext getFontRenderContext()
- Returns:
- the
Graphics2DFontRenderContext
-
getGraphicsBBox
org.apache.pdfbox.pdmodel.common.PDRectangle getGraphicsBBox()
- Returns:
- the bbox of the
PdfBoxGraphics2D
-
getResources
org.apache.pdfbox.pdmodel.PDResources getResources()
- Returns:
- the resource of the content stream
-
getCalculationGraphics
java.awt.Graphics2D getCalculationGraphics()
- Returns:
- the default calcuation BufferedImage based graphics.
-
applyStroke
void applyStroke(java.awt.Stroke stroke) throws java.io.IOExceptionApply this stroke on the current content stream- Parameters:
stroke- the stroke to apply- Throws:
java.io.IOException
-
getCurrentEffectiveTransform
java.awt.geom.AffineTransform getCurrentEffectiveTransform()
- Returns:
- the current transform active to draw on this stream
-
-