fixes a color issue in the fsm editor

This commit is contained in:
hneemann 2020-06-23 08:38:43 +02:00
parent c59e72e6b4
commit 0ffb6de3da
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,7 @@
Release Notes
Head, planned as v0.25
- Color schemes where added to support colorblind users.
- Unipolar and bipolar stepper motors were added.
- move the "lib" folder from the "examples" folder to the root folder.
- Reordering of the cells in the K-Map

View File

@ -315,7 +315,7 @@ public class FSMComponent extends JComponent {
protected void paintComponent(Graphics graphics) {
super.paintComponent(graphics);
graphics.setColor(Color.WHITE);
graphics.setColor(ColorScheme.getInstance().getColor(ColorKey.BACKGROUND));
graphics.fillRect(0, 0, getWidth(), getHeight());
Graphics2D gr2 = (Graphics2D) graphics;

View File

@ -43,7 +43,6 @@ import java.io.IOException;
import java.util.List;
import java.util.*;
import static de.neemann.digital.draw.graphics.ColorScheme.*;
import static de.neemann.digital.draw.shapes.GenericShape.SIZE;
import static de.neemann.digital.draw.shapes.GenericShape.SIZE2;
@ -858,7 +857,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
Graphics2D gr2 = buffer.createGraphics();
enableAntiAlias(gr2);
gr2.setColor(getInstance().getColor(ColorKey.BACKGROUND));
gr2.setColor(ColorScheme.getInstance().getColor(ColorKey.BACKGROUND));
gr2.fillRect(0, 0, getWidth(), getHeight());
if (scaleX > 0.3 && Settings.getInstance().get(Keys.SETTINGS_GRID))
@ -916,7 +915,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
if (delta > max) delta = max;
double sub = delta / 2.0;
gr2.setColor(getInstance().getColor(ColorKey.GRID));
gr2.setColor(ColorScheme.getInstance().getColor(ColorKey.GRID));
for (int x = 0; x <= cx; x++) {
double xx = p1.getX() + (p2.getX() - p1.getX()) * x / cx - sub;
for (int y = 0; y <= cy; y++) {