From d9ab1e297347a894c24ded5bdd23c68751da6551 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Thu, 16 May 2019 10:58:43 +0200 Subject: [PATCH 1/1] Fixed incorrect symbol for OR and AND gates --- LogicUI/src/era/mi/gui/components/GUIAndGate.java | 5 ++--- LogicUI/src/era/mi/gui/components/GUIOrGate.java | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/LogicUI/src/era/mi/gui/components/GUIAndGate.java b/LogicUI/src/era/mi/gui/components/GUIAndGate.java index 6f4601b2..6ad327a6 100644 --- a/LogicUI/src/era/mi/gui/components/GUIAndGate.java +++ b/LogicUI/src/era/mi/gui/components/GUIAndGate.java @@ -53,14 +53,13 @@ public class GUIAndGate extends AndGate implements BasicGUIComponent @Override public void render(GeneralGC gc) { - gc.drawRectangle(0, 0, 17, height); + gc.drawRectangle(0, 0, 20, height); Font oldFont = gc.getFont(); Font labelFont = new Font(oldFont.getName(), 5, oldFont.getStyle()); gc.setFont(labelFont); Point textExtent = gc.textExtent(LABEL); - gc.drawText(LABEL, 8.5 - textExtent.x / 2, (height - textExtent.y) / 2, true); + gc.drawText(LABEL, 10 - textExtent.x / 2, (height - textExtent.y) / 2, true); gc.setFont(oldFont); - gc.drawOval(17, height / 2 - 1.5, 3, 3); } @Override diff --git a/LogicUI/src/era/mi/gui/components/GUIOrGate.java b/LogicUI/src/era/mi/gui/components/GUIOrGate.java index 86cdb31c..e3ff8f39 100644 --- a/LogicUI/src/era/mi/gui/components/GUIOrGate.java +++ b/LogicUI/src/era/mi/gui/components/GUIOrGate.java @@ -53,14 +53,13 @@ public class GUIOrGate extends OrGate implements BasicGUIComponent @Override public void render(GeneralGC gc) { - gc.drawRectangle(0, 0, 17, height); + gc.drawRectangle(0, 0, 20, height); Font oldFont = gc.getFont(); Font labelFont = new Font(oldFont.getName(), 5, oldFont.getStyle()); gc.setFont(labelFont); Point textExtent = gc.textExtent(LABEL); - gc.drawText(LABEL, 8.5 - textExtent.x / 2, (height - textExtent.y) / 2, true); + gc.drawText(LABEL, 10 - textExtent.x / 2, (height - textExtent.y) / 2, true); gc.setFont(oldFont); - gc.drawOval(17, height / 2 - 1.5, 3, 3); } @Override -- 2.17.1