CenteredRectanglepublic class CenteredRectangle extends Rectangle implements Centered
Fields Summary |
---|
private double | cx | private double | cy |
Constructors Summary |
---|
public CenteredRectangle(double cx, double cy, double w, double h)
super(w, h);
this.cx = cx;
this.cy = cy;
|
Methods Summary |
---|
public double | getCenterX() return cx;
| public double | getCenterY() return cy;
| public void | setCenter(double x, double y) cx = x; cy = y;
|
|