Mercurial > hg > Applications > TreeVNC
diff src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 461:b7d43b12651c
fix getFbRectangles x may have minus value now, but xFb is always plus
author | kono |
---|---|
date | Mon, 04 Jul 2016 18:41:14 +0900 |
parents | c6058c4e2a79 |
children | 8d636adb292c |
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Mon Jun 27 18:07:29 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Mon Jul 04 18:41:14 2016 +0900 @@ -502,7 +502,10 @@ ArrayList<FbRectangle> fbRectangles = new ArrayList<FbRectangle>(); int screenNumber = 0; for (Rectangle rect : rectangles) { - fbRectangles.add(new FbRectangle(rect.x + offset.x, rect.y + offset.y, rect.width, rect.height, screenNumber, retinaScale(screenNumber))); + FbRectangle fbrect = new FbRectangle(rect.x, rect.y, rect.width, rect.height, screenNumber, retinaScale(screenNumber)); + fbrect.setXfb(rect.x + offset.x); + fbrect.setXfb(rect.y + offset.y); + fbRectangles.add(fbrect); screenNumber++; } @@ -525,7 +528,7 @@ retinaOffsetX += fbRectanglesPrev.getWidth() * (fbRectanglesPrev.retinaScale - 1); } } - fbRect.setXfb((int) (fbRect.getX() + retinaOffsetX)); + fbRect.setXfb((int) (fbRect.getXfb() + retinaOffsetX)); fbRectanglesPrev = fbRect; } @@ -548,7 +551,7 @@ retinaOffsetY += fbRectanglesPrev.getHeight() * (fbRectanglesPrev.retinaScale - 1); } } - fbRect.setYfb((int) (fbRect.getY() + retinaOffsetY)); + fbRect.setYfb((int) (fbRect.getYfb() + retinaOffsetY)); fbRectanglesPrev = fbRect; } return fbRectangles;