Добавлен класс Rect

This commit is contained in:
Victor 2014-03-02 18:10:49 +02:00
parent cf917bd143
commit d789f69c6e

View File

@ -0,0 +1,54 @@
package com.annimon.graphics;
/**
*
* @author aNNiMON
*/
public class Rect {
protected double x, y, width, height;
public Rect(double x, double y, double width, double height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public double getX() {
return x;
}
public void setX(double x) {
this.x = x;
}
public double getY() {
return y;
}
public void setY(double y) {
this.y = y;
}
public double getWidth() {
return width;
}
public void setWidth(double width) {
this.width = width;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
public void move(double dx, double dy) {
x += dx;
y += dy;
}
}