From 28eeb0192539fe41238450a804753293f574410a Mon Sep 17 00:00:00 2001 From: momeak Date: Thu, 14 Sep 2017 17:29:38 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4450=20=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9C=A8=E7=BC=A9=E6=94=BE=E5=90=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=EF=BC=8C=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=94=99=E4=B9=B1=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9xy=E5=9D=90=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/poly/PolyDesignUI.java | 2 +- designer/src/com/fr/poly/creator/ECBlockCreator.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/poly/PolyDesignUI.java b/designer/src/com/fr/poly/PolyDesignUI.java index 9fdc8788ef..8cc3583d85 100644 --- a/designer/src/com/fr/poly/PolyDesignUI.java +++ b/designer/src/com/fr/poly/PolyDesignUI.java @@ -106,7 +106,7 @@ public class PolyDesignUI extends ComponentUI { BlockCreator creator = addedData.getAddedAt(i); // richer:如果当前这个组件正在编辑,那么他是完全被他的编辑器所遮挡的,不需要画出来 if (creator == designer.getSelection()) { - paintPositionLine(g, Math.round(creator.getX() * time), Math.round(creator.getY() * time), + paintPositionLine(g, Math.round(creator.getX(time)), Math.round(creator.getY(time)), Math.round(designer.getHorizontalValue()*time), Math.round(designer.getVerticalValue()*time)); if (creator.getEditor().isDragging()) { creator.getEditor().paintAbsorptionline(g); diff --git a/designer/src/com/fr/poly/creator/ECBlockCreator.java b/designer/src/com/fr/poly/creator/ECBlockCreator.java index 92313115e4..3921bea39a 100644 --- a/designer/src/com/fr/poly/creator/ECBlockCreator.java +++ b/designer/src/com/fr/poly/creator/ECBlockCreator.java @@ -23,8 +23,8 @@ import com.fr.stable.unit.UnitRectangle; */ public class ECBlockCreator extends BlockCreator { private ECBlockEditor editor; - private static final int CREATOR_WIDTH = 30; - private static final int CREATOR_HEIGHT = 19; + private static final int CREATOR_WIDTH = 20; + private static final int CREATOR_HEIGHT = 9; public ECBlockCreator() { @@ -69,12 +69,12 @@ public class ECBlockCreator extends BlockCreator { @Override public int getX(float time) { - return (int) ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH; + return Math.round ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH; } @Override public int getY(float time) { - return (int) ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT; + return Math.round ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT; } /**