|
fop 0.95 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.fop.svg.PDFTextUtil
Utility class for generating PDF text objects.
| Field Summary | |
static int |
TR_CLIP
PDF text rendering mode: Add text to path for clipping |
static int |
TR_FILL
PDF text rendering mode: Fill text |
static int |
TR_FILL_CLIP
PDF text rendering mode: Fill text and add to path for clipping |
static int |
TR_FILL_STROKE
PDF text rendering mode: Fill, then stroke text |
static int |
TR_FILL_STROKE_CLIP
PDF text rendering mode: Fill, then stroke text and add to path for clipping |
static int |
TR_INVISIBLE
PDF text rendering mode: Neither fill nor stroke text (invisible) |
static int |
TR_STROKE
PDF text rendering mode: Stroke text |
static int |
TR_STROKE_CLIP
PDF text rendering mode: Stroke text and add to path for clipping |
| Constructor Summary | |
PDFTextUtil(PDFGraphics2D g2d)
Main constructor. |
|
| Method Summary | |
void |
adjustGlyphTJ(double adjust)
Writes a glyph adjust value to the "TJ-Buffer". |
void |
beginTextObject()
Called when a new text object should be started. |
void |
concatMatrixCurrentTransform()
Creates a "cm" command using the current transformation as the matrix. |
void |
endTextObject()
Called when a text object should be ended. |
Font |
getCurrentFont()
Returns the current font in use. |
void |
restoreGraphicsState()
Creates a "Q" command, restoring the entire graphics state to its former value by popping it from the stack. |
void |
saveGraphicsState()
Creates a "q" command, pushing a copy of the entire graphics state onto the stack. |
Font |
selectFontForChar(char ch)
Selects a font from the font list suitable to display the given character. |
void |
setCurrentFont(Font f)
Sets the current font. |
void |
setFont(Font font)
Sets the current font for the text object. |
void |
setFonts(Font[] fonts)
Sets the current fonts for the text object. |
void |
setTextRenderingMode(boolean fill,
boolean stroke,
boolean addToClip)
Sets the text rendering mode. |
void |
setTextRenderingMode(int mode)
Sets the text rendering mode. |
void |
writeTextMatrix(java.awt.geom.AffineTransform localTransform)
Writes a "Tm" command, setting a new text transformation matrix. |
void |
writeTf(Font f)
Writes a "Tf" command, setting a new current font. |
void |
writeTJ()
Writes a "TJ" command, writing out the accumulated buffer with the characters and glyph positioning values. |
void |
writeTJChar(char ch)
Writes a char to the "TJ-Buffer". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int TR_FILL
public static final int TR_STROKE
public static final int TR_FILL_STROKE
public static final int TR_INVISIBLE
public static final int TR_FILL_CLIP
public static final int TR_STROKE_CLIP
public static final int TR_FILL_STROKE_CLIP
public static final int TR_CLIP
| Constructor Detail |
public PDFTextUtil(PDFGraphics2D g2d)
g2d - the PDFGraphics2D instance to work with| Method Detail |
public void beginTextObject()
public void endTextObject()
public void saveGraphicsState()
public void restoreGraphicsState()
public void concatMatrixCurrentTransform()
public void setFonts(Font[] fonts)
fonts - the new fontspublic void setFont(Font font)
font - the new fontpublic Font getCurrentFont()
public void setCurrentFont(Font f)
f - the new font to usepublic void writeTf(Font f)
f - the font to selectpublic void setTextRenderingMode(int mode)
mode - the rendering mode (value 0 to 7, see PDF Spec, constants: TR_*)
public void setTextRenderingMode(boolean fill,
boolean stroke,
boolean addToClip)
fill - true if the text should be filledstroke - true if the text should be strokedaddToClip - true if the path should be added for clippingpublic void writeTextMatrix(java.awt.geom.AffineTransform localTransform)
localTransform - the new text transformation matrixpublic Font selectFontForChar(char ch)
ch - the character
public void writeTJChar(char ch)
ch - the unmapped characterpublic void adjustGlyphTJ(double adjust)
adjust - the glyph adjust value in thousands of text unit space.public void writeTJ()
|
fop 0.95 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||