kopia lustrzana https://github.com/peterhinch/micropython-font-to-py
add back original Bitmap.display() function
rodzic
3cf50e84c0
commit
3e36da26b5
|
@ -118,6 +118,15 @@ class Bitmap(object):
|
|||
|
||||
def display(self):
|
||||
"""Print the bitmap's pixels."""
|
||||
for row in range(self.height):
|
||||
for col in range(self.width):
|
||||
char = '#' if self.pixels[row * self.width + col] else '.'
|
||||
print(char, end='')
|
||||
print()
|
||||
print()
|
||||
|
||||
def display_line_map(self):
|
||||
"""Print the bitmap's line map."""
|
||||
lh_count = len(flatten(self.lh_data))
|
||||
print('{} horizontal line mapping: {} hline draw calls. {} bytes'.format(
|
||||
self.char,
|
||||
|
|
Ładowanie…
Reference in New Issue