com.lowagie.text.pdf.parser
public class TextRenderInfo extends java.lang.Object
PdfContentStreamProcessor
and
RenderListener
objects as text rendering operations are
discoveredModifier and Type | Field and Description |
---|---|
private GraphicsState |
gs |
private java.lang.String |
text |
private Matrix |
textToUserSpaceTransformMatrix |
Constructor and Description |
---|
TextRenderInfo(java.lang.String text,
GraphicsState gs,
Matrix textMatrix)
Creates a new TextRenderInfo object
|
Modifier and Type | Method and Description |
---|---|
Vector |
getEndPoint() |
float |
getSingleSpaceWidth() |
Vector |
getStartPoint() |
private float |
getStringWidth(java.lang.String string)
Gets the width of a String in text space units
|
java.lang.String |
getText() |
private float |
getUnscaledFontSpaceWidth()
Calculates the width of a space character.
|
float |
getUnscaledWidth() |
private final java.lang.String text
private final Matrix textToUserSpaceTransformMatrix
private final GraphicsState gs
TextRenderInfo(java.lang.String text, GraphicsState gs, Matrix textMatrix)
text
- the text that should be displayedgs
- the graphics state (note: at this time, this is not immutable, so don't cache it)textMatrix
- the text matrix at the time of the render operationpublic java.lang.String getText()
public float getUnscaledWidth()
public Vector getStartPoint()
public Vector getEndPoint()
public float getSingleSpaceWidth()
private float getUnscaledFontSpaceWidth()
private float getStringWidth(java.lang.String string)
string
- the string that needs measuring