com.jgoodies.animation.renderer
Class GlyphRenderer
- AnimationRenderer
public final class GlyphRenderer
Renders the glyphs of a string with individual scaling, transform, and color.
long | getTime()
|
void | render(Graphics2D g2, int width, int height)- Renders the text.
|
void | setTime(long time)
|
ensureValidCache, getAdjustedAscent, getAdjustedDescent, getColor, getFont, getHeightMode, getText, invalidateCache, isCacheValid, setCacheValid, setColor, setFont, setHeightMode, setText, validateCache |
GlyphRenderer
public GlyphRenderer(String text,
AnimationFunction scaleFunction,
AnimationFunction translateFunction,
AnimationFunction colorFunction,
long glyphDelay) Constructs a GlyphRenderer that paints
individual glyphs with different transforms.
text - the initial textscaleFunction - maps times to glyph scalestranslateFunction - maps times to glyph translationscolorFunction - maps times to colorsglyphDelay - a time delay between the glyph animations
getTime
public long getTime()
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 shaped,
using individual transforms.
- render in interface AnimationRenderer
g2 - the graphics object to render onwidth - the width of the graphics areaheight - the height of the graphics area
setTime
public void setTime(long time)
Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.