public class Java2DTextRenderer extends java.lang.Object implements TextRenderer
Constructor and Description |
---|
Java2DTextRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
drawGlyphVector(OutputDevice outputDevice,
FSGlyphVector fsGlyphVector,
float x,
float y) |
void |
drawString(OutputDevice outputDevice,
java.lang.String string,
float x,
float y) |
void |
drawString(OutputDevice outputDevice,
java.lang.String string,
float x,
float y,
JustificationInfo info) |
float |
getFontScale() |
FSFontMetrics |
getFSFontMetrics(FontContext fc,
FSFont font,
java.lang.String string) |
java.awt.Rectangle |
getGlyphBounds(OutputDevice outputDevice,
FSFont font,
FSGlyphVector fsGlyphVector,
int index,
float x,
float y) |
float[] |
getGlyphPositions(OutputDevice outputDevice,
FSFont font,
FSGlyphVector fsGlyphVector) |
float[] |
getGlyphPositions(OutputDevice outputDevice,
FSFont font,
java.lang.String text) |
FSGlyphVector |
getGlyphVector(OutputDevice outputDevice,
FSFont font,
java.lang.String text) |
java.lang.Object |
getRenderingHints()
If anti-alias text is enabled, the value from RenderingHints to use for AA smoothing in Java2D.
|
int |
getSmoothingLevel() |
int |
getWidth(FontContext fc,
FSFont font,
java.lang.String string) |
void |
setFontScale(float scale) |
void |
setRenderingHints(java.lang.Object renderingHints)
If anti-alias text is enabled, the value from RenderingHints to use for AA smoothing in Java2D.
|
void |
setSmoothingLevel(int level) |
void |
setSmoothingThreshold(float fontsize)
Set the smoothing threashold.
|
void |
setup(FontContext fontContext) |
public void drawString(OutputDevice outputDevice, java.lang.String string, float x, float y)
drawString
in interface TextRenderer
public void drawString(OutputDevice outputDevice, java.lang.String string, float x, float y, JustificationInfo info)
drawString
in interface TextRenderer
public void drawGlyphVector(OutputDevice outputDevice, FSGlyphVector fsGlyphVector, float x, float y)
drawGlyphVector
in interface TextRenderer
public void setup(FontContext fontContext)
setup
in interface TextRenderer
public void setFontScale(float scale)
setFontScale
in interface TextRenderer
public void setSmoothingThreshold(float fontsize)
TextRenderer
setSmoothingThreshold
in interface TextRenderer
public void setSmoothingLevel(int level)
setSmoothingLevel
in interface TextRenderer
level
- no-oppublic FSFontMetrics getFSFontMetrics(FontContext fc, FSFont font, java.lang.String string)
getFSFontMetrics
in interface TextRenderer
public int getWidth(FontContext fc, FSFont font, java.lang.String string)
getWidth
in interface TextRenderer
public float getFontScale()
getFontScale
in interface TextRenderer
public int getSmoothingLevel()
getSmoothingLevel
in interface TextRenderer
public java.lang.Object getRenderingHints()
RenderingHints.VALUE_TEXT_ANTIALIAS_ON
.public void setRenderingHints(java.lang.Object renderingHints)
RenderingHints.VALUE_TEXT_ANTIALIAS_ON
.renderingHints
- rendering hint for AA smoothing in Java2Dpublic float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, java.lang.String text)
public java.awt.Rectangle getGlyphBounds(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector, int index, float x, float y)
getGlyphBounds
in interface TextRenderer
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector)
getGlyphPositions
in interface TextRenderer
public FSGlyphVector getGlyphVector(OutputDevice outputDevice, FSFont font, java.lang.String text)
getGlyphVector
in interface TextRenderer