public class AnimatePaintStrategy extends APaintStrategy
Modifier and Type | Field and Description |
---|---|
private int |
count
The counter that keeps track of which paint strategy to use next.
|
private APaintStrategy[] |
paintStrats
The paint strategies to cycle through
|
NullObject
Constructor and Description |
---|
AnimatePaintStrategy(java.awt.geom.AffineTransform at,
APaintStrategy... pstrats)
Constructor that uses the supplied AffineTransform for internal use.
|
AnimatePaintStrategy(APaintStrategy... pstrats)
Constructor that instantiates an AffineTransform for internal use.
|
Modifier and Type | Method and Description |
---|---|
void |
paintXfrm(java.awt.Graphics g,
Ball host,
java.awt.geom.AffineTransform at)
Paints the currently indexed paint strategy on the given Graphics context
using the supplied AffineTransform.
|
getAT, init, paint, paintCfg
private APaintStrategy[] paintStrats
private int count
public AnimatePaintStrategy(APaintStrategy... pstrats)
pstrats
- vararg input of the paint strategies to cycle through, in
order.public AnimatePaintStrategy(java.awt.geom.AffineTransform at, APaintStrategy... pstrats)
at
- The AffineTransform to use.pstrats
- vararg input of the paint strategies to cycle through, in
order.public void paintXfrm(java.awt.Graphics g, Ball host, java.awt.geom.AffineTransform at)
paintXfrm
in class APaintStrategy
g
- The Graphics context to paint upon.host
- The host Ballat
- The AffineTransform to use