make the generator script output two columns

master
Lephenixnoir 3 years ago
parent 9bb2fd9b82
commit ecc83c2d0b
  1. 17
      gen.py
  2. BIN
      uf5x7.png

@ -100,16 +100,27 @@ class Block:
blocks = [ Block(file) for file in files ]
height = sum(b.height() for b in blocks)
result = PIL.Image.new("RGB", (112, height))
left_height = 0
for b in blocks:
left_height += b.height()
if 2 * left_height >= height: break
result = PIL.Image.new("RGB", (2 * 112 + 8, left_height), color=WHITE)
x = 0
y = 0
for b in blocks:
header = b.header()
result.paste(header, (0, y))
result.paste(header, (x, y))
y += header.height
body = b.body()
result.paste(body, (0, y))
result.paste(body, (x, y))
y += body.height
if y >= left_height:
y = 0
x += 112 + 8
result.save("uf5x7.png")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Loading…
Cancel
Save