|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.effects.FadeEffect
public class FadeEffect
Handles the math and timing of doing a fade effect in a sprite or animation.
| Field Summary | |
|---|---|
protected float |
_alpha
The current alpha of the image. |
protected Composite |
_comp
The composite used to render the image with the current alpha. |
protected boolean |
_finished
True when we're finished. |
protected long |
_initStamp
Time zero. |
protected Composite |
_ocomp
The composite in effect outside our faded render. |
protected float |
_startAlpha
The starting alpha. |
protected float |
_step
The alpha step per millisecond. |
protected float |
_target
The target alpha. |
| Constructor Summary | |
|---|---|
FadeEffect(float alpha,
float step,
float target)
|
|
| Method Summary | |
|---|---|
void |
afterPaint(Graphics2D gfx)
|
void |
beforePaint(Graphics2D gfx)
|
boolean |
finished()
|
float |
getAlpha()
|
void |
init(long tickStamp)
|
boolean |
tick(long tickStamp)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Composite _comp
protected Composite _ocomp
protected float _alpha
protected float _target
protected float _step
protected float _startAlpha
protected long _initStamp
protected boolean _finished
| Constructor Detail |
|---|
public FadeEffect(float alpha,
float step,
float target)
| Method Detail |
|---|
public void init(long tickStamp)
public boolean finished()
public float getAlpha()
public boolean tick(long tickStamp)
public void beforePaint(Graphics2D gfx)
public void afterPaint(Graphics2D gfx)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||