diff --git a/src/com/annimon/graphics/Rect.java b/src/com/annimon/graphics/Rect.java new file mode 100644 index 0000000..e30c18f --- /dev/null +++ b/src/com/annimon/graphics/Rect.java @@ -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; + } +} \ No newline at end of file