com.jgoodies.animation.renderer
Class BasicTextRenderer
- AnimationRenderer
public final class BasicTextRenderer
Renders a text with modifiable scaling, color, glyph spacing and position.
BasicTextRenderer(String text) - Constructs a renderer for a text that can be scaled, moved, and
change inter-glyph space.
|
ensureValidCache , getAdjustedAscent , getAdjustedDescent , getColor , getFont , getHeightMode , getText , invalidateCache , isCacheValid , setCacheValid , setColor , setFont , setHeightMode , setText , validateCache |
BasicTextRenderer
public BasicTextRenderer(String text)
Constructs a renderer for a text that can be scaled, moved, and
change inter-glyph space.
text
- the text to be displayed
getOffsetX
public float getOffsetX()
getOffsetY
public float getOffsetY()
getScaleX
public float getScaleX()
getScaleY
public float getScaleY()
getSpace
public float getSpace()
render
public void render(Graphics2D g2,
int width,
int height)
Renders the text. Firstly ensures a valid cache, then sets
the color, and finally paints the cached glyph shapes.
- render in interface AnimationRenderer
g2
- the graphics context to render onwidth
- the width of the drawing surfaceheight
- the height of the drawing surface
setOffsetX
public void setOffsetX(float offsetX)
setOffsetY
public void setOffsetY(float offsetY)
setScaleX
public void setScaleX(float scaleX)
setScaleY
public void setScaleY(float scaleY)
setSpace
public void setSpace(float space)
Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.