diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2017-05-24 23:31:07 -0400 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2017-05-24 23:35:21 -0400 |
commit | b6b61c1da717395c4c1e888abd052c03a527ebb5 (patch) | |
tree | 9902aac74fb5ead89440443cc5fb83cd41953770 | |
parent | 60a17853ade06082c7adc5682d8437db319db5eb (diff) | |
download | tigervnc-b6b61c1da717395c4c1e888abd052c03a527ebb5.tar.gz tigervnc-b6b61c1da717395c4c1e888abd052c03a527ebb5.zip |
Various fixes for Region handling in java viewer
-rw-r--r-- | java/com/tigervnc/rfb/Region.java | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/java/com/tigervnc/rfb/Region.java b/java/com/tigervnc/rfb/Region.java index f7da91de..56a00af2 100644 --- a/java/com/tigervnc/rfb/Region.java +++ b/java/com/tigervnc/rfb/Region.java @@ -35,7 +35,6 @@ public class Region extends Area { public Region(Region r) { super(r); - //intersect(r); } public void clear() { reset(); } @@ -46,13 +45,6 @@ public class Region extends Area { } else { clear(); assign_union(new Region(r)); - /* - xrgn.numRects = 1; - xrgn.rects[0].x1 = xrgn.extents.x1 = r.tl.x; - xrgn.rects[0].y1 = xrgn.extents.y1 = r.tl.y; - xrgn.rects[0].x2 = xrgn.extents.x2 = r.br.x; - xrgn.rects[0].y2 = xrgn.extents.y2 = r.br.y; - */ } } @@ -63,33 +55,33 @@ public class Region extends Area { } public void assign_intersect(Region r) { - intersect(r); + super.intersect(r); } public void assign_union(Region r) { - add(r); + super.add(r); } public void assign_subtract(Region r) { - subtract(r); + super.subtract(r); } public Region intersect(Region r) { - Region ret = new Region(this); - ((Area)ret).intersect(this); - return ret; + Region reg = new Region(this); + ((Area)reg).intersect(r); + return reg; } public Region union(Region r) { - Region ret = new Region(r); - ((Area)ret).add(this); - return ret; + Region reg = new Region(this); + ((Area)reg).add(r); + return reg; } public Region subtract(Region r) { - Region ret = new Region(this); - ((Area)ret).subtract(r); - return ret; + Region reg = new Region(this); + ((Area)reg).subtract(r); + return reg; } public boolean is_empty() { return isEmpty(); } |