Skip to content

Commit 704802e

Browse files
committed
Fixes subcircuit coloring
1 parent 1c75457 commit 704802e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/draw/model/AbstractCanvasObject.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,11 @@ protected boolean setForStroke(Graphics g) {
192192
Integer width = getValue(DrawAttr.STROKE_WIDTH);
193193
if (width != null && width.intValue() > 0) {
194194
Color color = getValue(DrawAttr.STROKE_COLOR);
195-
if (color != null && color.getAlpha() == 0) {
195+
if (color != null && color.getAlpha() == 0 && color.getRGB() != 0) {
196196
return false;
197-
} else {
197+
}
198+
else {
199+
color = new Color(190, 190, 190);
198200
GraphicsUtil.switchToWidth(g, width.intValue());
199201
if (color != null) g.setColor(color);
200202
return true;

src/draw/shapes/SvgReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static AbstractCanvasObject createShape(Element elt) {
6969
}
7070
if (attrs.contains(DrawAttr.FILL_COLOR)) {
7171
String color = elt.getAttribute("fill");
72-
if (color.equals("")) color = "#000000";
72+
if (color.equals("")) color = "#BEBEBE";
7373
String opacity = elt.getAttribute("fill-opacity");
7474
if (!color.equals("none")) {
7575
ret.setValue(DrawAttr.FILL_COLOR, getColor(color, opacity));

0 commit comments

Comments
 (0)