tag bounds fixed

This commit is contained in:
honfika@gmail.com
2015-01-31 16:58:17 +01:00
parent a805e70820
commit 1f09953178
28 changed files with 167 additions and 93 deletions

View File

@@ -631,7 +631,7 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
}
mat = Helper.deepCopy(mat);
if (parent instanceof BoundedTag) {
RECT r = ((BoundedTag) parent).getRect(new HashSet<BoundedTag>());
RECT r = ((BoundedTag) parent).getRect();
mat.translateX = mat.translateX + width / 2 - r.getWidth() / 2;
mat.translateY = mat.translateY + height / 2 - r.getHeight() / 2;
} else {
@@ -680,7 +680,7 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
mat.translateX = 0;
mat.translateY = 0;
if (tagObj instanceof BoundedTag) {
RECT r = ((BoundedTag) tagObj).getRect(new HashSet<BoundedTag>());
RECT r = ((BoundedTag) tagObj).getRect();
mat.translateX = -r.Xmin;
mat.translateY = -r.Ymin;
mat.translateX = mat.translateX + width / 2 - r.getWidth() / 2;