Stopped creation of unneccessary Rectangle instances
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / wires / WireCrossPoint.java
index ed4407d..625bf8a 100644 (file)
@@ -42,9 +42,8 @@ public class WireCrossPoint extends GUIComponent
        @Override\r
        public void render(GeneralGC gc, Rectangle visibleRegion)\r
        {\r
-               Rectangle bounds = getBounds();\r
                ColorHelper.executeWithDifferentBackground(gc, BitVectorFormatter.formatAsColor(end),\r
-                               () -> gc.fillOval(bounds.x, bounds.y, CIRCLE_DIAM, CIRCLE_DIAM));\r
+                               () -> gc.fillOval(getPosX(), getPosY(), CIRCLE_DIAM, CIRCLE_DIAM));\r
        }\r
 \r
        public void setLogicModelBinding(ReadEnd end)\r