From e5a54886b5855bd3ca0d7766a6157d27c165d712 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Thu, 12 Oct 2017 16:10:43 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4888=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=8D=95=E5=85=83=E6=8A=A5=E8=A1=A8=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/creator/BlockCreator.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/poly/creator/BlockCreator.java b/designer/src/com/fr/poly/creator/BlockCreator.java index 052e111a8e..a5e9535c2c 100644 --- a/designer/src/com/fr/poly/creator/BlockCreator.java +++ b/designer/src/com/fr/poly/creator/BlockCreator.java @@ -114,10 +114,12 @@ public abstract class BlockCreator extends JComponent i public Rectangle getEditorBounds() { Rectangle bounds = this.getBounds(); Dimension d = getEditor().getCornerSize(); - bounds.x -= d.width + designer.getHorizontalValue(); - bounds.y -= d.height + designer.getVerticalValue(); - bounds.width += d.width + PolyConstants.OPERATION_SIZE; - bounds.height += d.height + PolyConstants.OPERATION_SIZE; + //ECBlockCreator缩放的时候边框需要重新算下 + double times = this.designer.getResolution() / (double)resolution; + bounds.x -= d.width/times + designer.getHorizontalValue(); + bounds.y -= d.height/times + designer.getVerticalValue(); + bounds.width += Math.ceil(d.width/times + PolyConstants.OPERATION_SIZE/times); + bounds.height += Math.ceil(d.height/times + PolyConstants.OPERATION_SIZE/times); return bounds; }