public class UprightImagePaintStrategy extends ImagePaintStrategy
localAT, tempATNullObject| Constructor and Description |
|---|
UprightImagePaintStrategy(java.lang.String filename,
double fillFactor)
Constructor for an image painting strategy
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
paintCfg(java.awt.Graphics g,
Ball host)
Augments the inherited paint method to add flipping of the image to keep
it upright whenever the ball is going towards the left.
|
init, paintXfrmgetAT, paintpublic UprightImagePaintStrategy(java.lang.String filename,
double fillFactor)
filename - Fully qualified filename of the image file RELATIVE TO THIS PACKAGE, using a forward slash as a directory divider.fillFactor - The ratio of the effective diameter (hit circle) of the image to the average of its width and height.protected void paintCfg(java.awt.Graphics g,
Ball host)
paintCfg in class APaintStrategyg - The Graphics context that will be drawn upon.host - The Ball to be painted.