diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationComponent.java b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationComponent.java index 90461a78..b2be209a 100644 --- a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationComponent.java +++ b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationComponent.java @@ -33,8 +33,6 @@ import org.hyperion.hypercon.spec.LedFrameConstruction; public class LedSimulationComponent extends JPanel { - private double mBorderFraction = 0.2; - private BufferedImage mTvImage = new BufferedImage(640, 480, BufferedImage.TYPE_INT_ARGB); private void setImage(Image pImage) { @@ -173,8 +171,8 @@ public class LedSimulationComponent extends JPanel { } int width = backgroundImage.getWidth(); int height = backgroundImage.getHeight(); - int borderWidth = (int) (backgroundImage.getWidth() * mBorderFraction); - int borderHeight = (int) (backgroundImage.getHeight() * mBorderFraction); + int borderWidth = (int) (backgroundImage.getWidth() * 0.1); + int borderHeight = (int) (backgroundImage.getHeight() * 0.2); mTopLeftImage.setImage(backgroundImage.getSubimage(0, 0, borderWidth, borderHeight)); mTopImage.setImage(backgroundImage.getSubimage(borderWidth, 0, width-2*borderWidth, borderHeight)); diff --git a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationWorker.java b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationWorker.java index afe5edd2..9f5320d5 100644 --- a/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationWorker.java +++ b/src/config-tool/ConfigTool/src/org/hyperion/hypercon/gui/LedSimulationWorker.java @@ -15,8 +15,6 @@ import org.hyperion.hypercon.spec.Led; public class LedSimulationWorker extends SwingWorker { - private final double mBorderFraction = 0.2; - private final BufferedImage mTvImage; private final Vector mLeds; @@ -78,15 +76,16 @@ public class LedSimulationWorker extends SwingWorker { } Point tv2image(Dimension pImageDim, Point2D point) { - double tvFraction = (1.0 - 2*mBorderFraction); + double tvWidthFraction = (1.0 - 2*0.1); + double tvHeightFraction = (1.0 - 2*0.2); - double tvWidth = tvFraction * pImageDim.width; + double tvWidth = tvWidthFraction * pImageDim.width; double tvXIndex = point.getX()*tvWidth; - double imageXIndex = tvXIndex + mBorderFraction*pImageDim.width; + double imageXIndex = tvXIndex + 0.1*pImageDim.width; - double tvHeight = tvFraction * pImageDim.height; + double tvHeight = tvHeightFraction * pImageDim.height; double tvYIndex = point.getY()*tvHeight; - double imageYIndex = tvYIndex + mBorderFraction*pImageDim.height; + double imageYIndex = tvYIndex + 0.2*pImageDim.height; return new Point((int)imageXIndex, (int)imageYIndex); }