|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xhtmlrenderer.swing.Java2DTextRenderer
public class Java2DTextRenderer
Renders to a Graphics2D instance.
| Field Summary | |
|---|---|
protected Object |
antiAliasRenderingHint
|
protected Object |
fractionalFontMetricsHint
|
protected float |
scale
|
protected float |
threshold
|
| Constructor Summary | |
|---|---|
Java2DTextRenderer()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float scale
protected float threshold
protected Object antiAliasRenderingHint
protected Object fractionalFontMetricsHint
| Constructor Detail |
|---|
public Java2DTextRenderer()
| Method Detail |
|---|
public void drawString(OutputDevice outputDevice,
String string,
float x,
float y)
drawString in interface TextRenderer
public void drawString(OutputDevice outputDevice,
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 TextRendererpublic void setup(FontContext fontContext)
setup in interface TextRendererpublic void setFontScale(float scale)
setFontScale in interface TextRendererpublic void setSmoothingThreshold(float fontsize)
TextRenderer
setSmoothingThreshold in interface TextRendererpublic void setSmoothingLevel(int level)
setSmoothingLevel in interface TextRendererlevel - no-op
public FSFontMetrics getFSFontMetrics(FontContext fc,
FSFont font,
String string)
getFSFontMetrics in interface TextRenderer
public 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 Java2D
public 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 TextRenderer
public float[] getGlyphPositions(OutputDevice outputDevice,
FSFont font,
FSGlyphVector fsGlyphVector)
getGlyphPositions in interface TextRenderer
public FSGlyphVector getGlyphVector(OutputDevice outputDevice,
FSFont font,
String text)
getGlyphVector in interface TextRenderer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||