From: Bruno JOFRET Date: Tue, 31 Jul 2012 14:40:14 +0000 (+0200) Subject: Wrong Zoombox calculation for isoview. X-Git-Tag: 5.4.0-beta-2~18 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=27cb2fbe8f97490426e978fd738c7c118c0ab06d Wrong Zoombox calculation for isoview. Change-Id: I15e5b684f395af0f6435ede23c87a9029b3296bb --- diff --git a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/AxesDrawer.java b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/AxesDrawer.java index f6b082d..554edbe 100644 --- a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/AxesDrawer.java +++ b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/axes/AxesDrawer.java @@ -297,10 +297,10 @@ public class AxesDrawer { Double[] margins = axes.getMargins(); // TODO : zoom box. - double x = axesBounds[0] - 1 + (margins[0] * 2); - double y = axesBounds[1] - 1 + (margins[3] * 2); - double w = axesBounds[2] - margins[1] - margins[0]; - double h = axesBounds[3] - margins[2] - margins[3]; + double x = (axesBounds[0] + axesBounds[2] * margins[0]) * 2 - 1; + double y = (1.0 - axesBounds[1] - axesBounds[3] * (1.0 - margins[3])) * 2 - 1; + double w = (1 - margins[0] - margins[1]) * axesBounds[2]; + double h = (1 - margins[2] - margins[3]) * axesBounds[3]; if (axes.getIsoview()) { double minSize = Math.min(w, h);