0
0
mirror of https://github.com/markusfisch/BinaryEye.git synced 2024-09-20 03:52:16 +02:00

Fix indent of new code for generating text output

We're not mixing tabs and spaces.
This commit is contained in:
Markus Fisch 2022-08-20 18:56:50 +02:00
parent 19fb733182
commit 6a47a7e477

View File

@ -171,22 +171,22 @@ fun encodeAsText(
val w = bitMatrix.width
val h = bitMatrix.height
val sb = StringBuilder()
for (y in 0 until h step 2) {
for (x in 0 until w) {
val tp = bitMatrix.get(y, x)
var bt = y + 1 >= h || bitMatrix.get(y + 1, x);
if (tp && bt) {
sb.append(' ')//'\u0020'
} else if (tp) {
sb.append('▄')//'\u2584'
} else if (bt) {
sb.append('▀')//'\u2580'
} else {
sb.append('█')//'\u2588'
}
}
sb.append('\n')
}
for (y in 0 until h step 2) {
for (x in 0 until w) {
val tp = bitMatrix.get(y, x)
var bt = y + 1 >= h || bitMatrix.get(y + 1, x);
if (tp && bt) {
sb.append(' ')//'\u0020'
} else if (tp) {
sb.append('▄')//'\u2584'
} else if (bt) {
sb.append('▀')//'\u2580'
} else {
sb.append('█')//'\u2588'
}
}
sb.append('\n')
}
return sb.toString()
}