org.docx4j.org.xhtmlrenderer.docx
Class Docx4jTextRenderer
java.lang.Object
org.docx4j.org.xhtmlrenderer.docx.Docx4jTextRenderer
- All Implemented Interfaces:
- TextRenderer
public class Docx4jTextRenderer
- extends Object
- implements TextRenderer
|
Method Summary |
void |
drawGlyphVector(OutputDevice outputDevice,
FSGlyphVector vector,
float x,
float y)
|
void |
drawString(OutputDevice outputDevice,
String string,
float x,
float y)
|
void |
drawString(OutputDevice outputDevice,
String string,
float x,
float y,
JustificationInfo info)
|
float |
getFontScale()
|
FSFontMetrics |
getFSFontMetrics(FontContext context,
FSFont font,
String string)
|
Rectangle |
getGlyphBounds(OutputDevice outputDevice,
FSFont font,
FSGlyphVector fsGlyphVector,
int index,
float x,
float y)
|
float[] |
getGlyphPositions(OutputDevice outputDevice,
FSFont font,
FSGlyphVector fsGlyphVector)
|
FSGlyphVector |
getGlyphVector(OutputDevice outputDevice,
FSFont font,
String string)
|
int |
getSmoothingLevel()
|
int |
getWidth(FontContext context,
FSFont font,
String string)
|
void |
setFontScale(float scale)
|
void |
setSmoothingLevel(int level)
|
void |
setSmoothingThreshold(float fontsize)
Set the smoothing threashold. |
void |
setup(FontContext context)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Docx4jTextRenderer
public Docx4jTextRenderer()
setup
public void setup(FontContext context)
- Specified by:
setup in interface TextRenderer
drawString
public void drawString(OutputDevice outputDevice,
String string,
float x,
float y)
- Specified by:
drawString in interface TextRenderer
drawString
public void drawString(OutputDevice outputDevice,
String string,
float x,
float y,
JustificationInfo info)
- Specified by:
drawString in interface TextRenderer
getFSFontMetrics
public FSFontMetrics getFSFontMetrics(FontContext context,
FSFont font,
String string)
- Specified by:
getFSFontMetrics in interface TextRenderer
getWidth
public int getWidth(FontContext context,
FSFont font,
String string)
- Specified by:
getWidth in interface TextRenderer
setFontScale
public void setFontScale(float scale)
- Specified by:
setFontScale in interface TextRenderer
getFontScale
public float getFontScale()
- Specified by:
getFontScale in interface TextRenderer
setSmoothingThreshold
public void setSmoothingThreshold(float fontsize)
- Description copied from interface:
TextRenderer
- Set the smoothing threashold. This is a font size above which
all text will be anti-aliased. Text below this size will not be antialiased.
Set to -1 for no antialiasing.
Set to 0 for all antialising.
Else, set to the threshold font size. does not take font scaling
into account.
- Specified by:
setSmoothingThreshold in interface TextRenderer
getSmoothingLevel
public int getSmoothingLevel()
- Specified by:
getSmoothingLevel in interface TextRenderer
setSmoothingLevel
public void setSmoothingLevel(int level)
- Specified by:
setSmoothingLevel in interface TextRenderer
- Parameters:
level - no-op
getGlyphBounds
public Rectangle getGlyphBounds(OutputDevice outputDevice,
FSFont font,
FSGlyphVector fsGlyphVector,
int index,
float x,
float y)
- Specified by:
getGlyphBounds in interface TextRenderer
getGlyphPositions
public float[] getGlyphPositions(OutputDevice outputDevice,
FSFont font,
FSGlyphVector fsGlyphVector)
- Specified by:
getGlyphPositions in interface TextRenderer
getGlyphVector
public FSGlyphVector getGlyphVector(OutputDevice outputDevice,
FSFont font,
String string)
- Specified by:
getGlyphVector in interface TextRenderer
drawGlyphVector
public void drawGlyphVector(OutputDevice outputDevice,
FSGlyphVector vector,
float x,
float y)
- Specified by:
drawGlyphVector in interface TextRenderer
Copyright © 2011-2012. All Rights Reserved.