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