public final class BasicTextRenderer extends AbstractTextRenderer
cachedGlyphShapes, cachedGlyphVector, cachedTextAscent, cachedTextHeight, cachedTextWidth, capitalMAscent
Constructor and Description |
---|
BasicTextRenderer(String text)
Constructs a renderer for a text that can be scaled, moved, and
change inter-glyph space.
|
Modifier and Type | Method and Description |
---|---|
float |
getOffsetX() |
float |
getOffsetY() |
float |
getScaleX() |
float |
getScaleY() |
float |
getSpace() |
void |
render(Graphics2D g2,
int width,
int height)
Renders the text.
|
void |
setOffsetX(float offsetX) |
void |
setOffsetY(float offsetY) |
void |
setScaleX(float scaleX) |
void |
setScaleY(float scaleY) |
void |
setSpace(float space) |
ensureValidCache, getAdjustedAscent, getAdjustedDescent, getColor, getFont, getHeightMode, getText, invalidateCache, isCacheValid, setCacheValid, setColor, setFont, setHeightMode, setText, validateCache
public BasicTextRenderer(String text)
text
- the text to be displayedpublic float getOffsetX()
public float getOffsetY()
public float getSpace()
public void setOffsetX(float offsetX)
public void setOffsetY(float offsetY)
public void setSpace(float space)
public float getScaleX()
public float getScaleY()
public void setScaleX(float scaleX)
public void setScaleY(float scaleY)
public void render(Graphics2D g2, int width, int height)
g2
- the graphics context to render onwidth
- the width of the drawing surfaceheight
- the height of the drawing surfaceCopyright © 2018 JGoodies Software GmbH. All rights reserved.