ballwar.model.paint
Class EllipsePaintStrategy
java.lang.Object
ballwar.model.paint.APaintStrategy
ballwar.model.paint.ShapePaintStrategy
ballwar.model.paint.EllipsePaintStrategy
- All Implemented Interfaces:
- IPaintStrategy
public class EllipsePaintStrategy
- extends ShapePaintStrategy
Paint strategy to paint an ellipse shape
Constructor Summary |
EllipsePaintStrategy()
No parameter constructor that creates a prototype ellipse that
has twice the width as height but an average radius of 1. |
EllipsePaintStrategy(AffineTransform at,
double x,
double y,
double width,
double height)
Constructor that allows the specification of the location, x-radius and y-radius
of the prototype ellipse. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EllipsePaintStrategy
public EllipsePaintStrategy()
- No parameter constructor that creates a prototype ellipse that
has twice the width as height but an average radius of 1.
An AffineTranform for internal use is instantiated.
EllipsePaintStrategy
public EllipsePaintStrategy(AffineTransform at,
double x,
double y,
double width,
double height)
- Constructor that allows the specification of the location, x-radius and y-radius
of the prototype ellipse. The AffineTransform to use is given.
- Parameters:
at
- The AffineTransform to use for internal calculationsx
- floating point x-coordinate of center of circley
- floating point y-coordinate of center of circlewidth
- floating point x-radius of the circle (ellipse)height
- floating point y-radius of the circle (ellipse)