We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca8b454 commit b7cf21aCopy full SHA for b7cf21a
src/main/groovy/net/zomis/machlearn/images/ZRect.java
@@ -11,6 +11,10 @@ public ZRect() {
11
this(0, 0, 0, 0);
12
}
13
14
+ public ZRect(ZRect copyOf) {
15
+ this(copyOf.left, copyOf.top, copyOf.right, copyOf.bottom);
16
+ }
17
+
18
public ZRect(int left, int top, int right, int bottom) {
19
this.left = left;
20
this.top = top;
@@ -35,4 +39,12 @@ public int width() {
35
39
public int height() {
36
40
return this.bottom - this.top;
37
41
42
43
+ public ZRect expand(int amount) {
44
+ this.left -= amount;
45
+ this.top -= amount;
46
+ this.right += amount;
47
+ this.bottom += amount;
48
+ return this;
49
38
50
0 commit comments