com.jgoodies.animation.renderer
Class GlyphRenderer
java.lang.Object
com.jgoodies.animation.renderer.AbstractTextRenderer
com.jgoodies.animation.renderer.GlyphRenderer
- All Implemented Interfaces:
- AnimationRenderer
public final class GlyphRenderer
- extends AbstractTextRenderer
Renders the glyphs of a string with individual scaling, transform, and color.
- Version:
- $Revision: 1.1 $
- Author:
- Karsten Lentzsch
Methods inherited from class com.jgoodies.animation.renderer.AbstractTextRenderer |
ensureValidCache, getAdjustedAscent, getAdjustedDescent, getColor, getFont, getHeightMode, getText, invalidateCache, isCacheValid, setCacheValid, setColor, setFont, setHeightMode, setText, validateCache |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlyphRenderer
public GlyphRenderer(String text,
AnimationFunction scaleFunction,
AnimationFunction translateFunction,
AnimationFunction colorFunction,
long glyphDelay)
- Constructs a
GlyphRenderer
that paints
individual glyphs with different transforms.
- Parameters:
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()
setTime
public void setTime(long time)
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.
- Parameters:
g2
- the graphics object to render onwidth
- the width of the graphics areaheight
- the height of the graphics area
Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.