public class Java2DTextRenderer extends Object implements TextRenderer
| Modifier and Type | Field and Description |
|---|---|
protected Object |
antiAliasRenderingHint |
protected Object |
fractionalFontMetricsHint |
protected float |
scale |
protected float |
threshold |
| Constructor and Description |
|---|
Java2DTextRenderer() |
| Modifier and Type | Method and Description |
|---|---|
void |
drawGlyphVector(OutputDevice outputDevice,
FSGlyphVector fsGlyphVector,
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 fc,
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) |
float[] |
getGlyphPositions(OutputDevice outputDevice,
FSFont font,
String text) |
FSGlyphVector |
getGlyphVector(OutputDevice outputDevice,
FSFont font,
String text) |
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,
String string) |
void |
setFontScale(float scale) |
void |
setRenderingHints(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) |
protected float scale
protected float threshold
protected Object antiAliasRenderingHint
protected Object fractionalFontMetricsHint
public void drawString(OutputDevice outputDevice, String string, float x, float y)
drawString in interface TextRendererpublic void drawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info)
drawString in interface TextRendererpublic void drawGlyphVector(OutputDevice outputDevice, FSGlyphVector fsGlyphVector, float x, float y)
drawGlyphVector in interface TextRendererpublic void setup(FontContext fontContext)
setup in interface TextRendererpublic void setFontScale(float scale)
setFontScale in interface TextRendererpublic void setSmoothingThreshold(float fontsize)
TextRenderersetSmoothingThreshold in interface TextRendererpublic void setSmoothingLevel(int level)
setSmoothingLevel in interface TextRendererlevel - no-oppublic FSFontMetrics getFSFontMetrics(FontContext fc, FSFont font, String string)
getFSFontMetrics in interface TextRendererpublic int getWidth(FontContext fc, FSFont font, String string)
getWidth in interface TextRendererpublic float getFontScale()
getFontScale in interface TextRendererpublic int getSmoothingLevel()
getSmoothingLevel in interface TextRendererpublic Object getRenderingHints()
RenderingHints.VALUE_TEXT_ANTIALIAS_ON.public void setRenderingHints(Object renderingHints)
RenderingHints.VALUE_TEXT_ANTIALIAS_ON.renderingHints - rendering hint for AA smoothing in Java2Dpublic float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, String text)
public Rectangle getGlyphBounds(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector, int index, float x, float y)
getGlyphBounds in interface TextRendererpublic float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector)
getGlyphPositions in interface TextRendererpublic FSGlyphVector getGlyphVector(OutputDevice outputDevice, FSFont font, String text)
getGlyphVector in interface TextRendererCopyright © 2018. All rights reserved.