mirror of
https://github.com/AppleCommander/bastools.git
synced 2024-11-15 15:07:26 +00:00
Using spaces to show unused area in shape.
This commit is contained in:
parent
37683e1852
commit
55434b6f53
@ -113,12 +113,16 @@ public class TextShapeExporter implements ShapeExporter {
|
|||||||
private void drawRowLine(PrintWriter pw, BitmapShape bshape, int width, int y) {
|
private void drawRowLine(PrintWriter pw, BitmapShape bshape, int width, int y) {
|
||||||
List<Boolean> row = bshape.grid.size() > y ? bshape.grid.get(y) : new ArrayList<>();
|
List<Boolean> row = bshape.grid.size() > y ? bshape.grid.get(y) : new ArrayList<>();
|
||||||
for (int x=0; x<width; x++) {
|
for (int x=0; x<width; x++) {
|
||||||
Boolean plot = row.size() > x ? row.get(x) : Boolean.FALSE;
|
if (row.size() > x) {
|
||||||
|
Boolean plot = row.get(x);
|
||||||
if (bshape.origin.x == x && bshape.origin.y == y) {
|
if (bshape.origin.x == x && bshape.origin.y == y) {
|
||||||
pw.printf("%c", plot ? '*' : '+');
|
pw.printf("%c", plot ? '*' : '+');
|
||||||
} else {
|
} else {
|
||||||
pw.printf("%c", plot ? 'X' : '.');
|
pw.printf("%c", plot ? 'X' : '.');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
pw.print(" ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user