public class UprightImagePaintStrategy extends ImagePaintStrategy
localAT, tempAT
NullObject
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, paintXfrm
getAT, paint
public 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 APaintStrategy
g
- The Graphics context that will be drawn upon.host
- The Ball to be painted.