Skip to content

Commit e02c72b

Browse files
committed
Update morph test to use the factored out bitmap routine
1 parent 3641120 commit e02c72b

2 files changed

Lines changed: 86 additions & 97 deletions

File tree

tests/circuitpython/bitmapfilter_morph.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
from displayio import Bitmap
22
import bitmapfilter
3-
4-
palette = list(" ░░▒▒▓▓█")
5-
6-
7-
def dump_bitmap(b):
8-
for i in range(b.height):
9-
for j in range(b.width):
10-
# Bit order is gggBBBBBRRRRRGGG" so this takes high order bits of G
11-
p = b[i, j] & 7
12-
print(end=palette[p])
13-
print()
14-
print()
3+
from dump_bitmap import dump_bitmap
154

165

176
def make_circle_bitmap():
Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
1-
████████ ████████
2-
█████ █████
3-
███ ███
4-
██ ██
5-
██ ██
6-
█ █
7-
█ █
8-
█ █
9-
10-
█ █
11-
█ █
12-
█ █
13-
██ ██
14-
██ ██
15-
███ ███
16-
█████ █████
17-
████████ ████████
1+
········█········
2+
·····███████·····
3+
···███████████···
4+
··█████████████··
5+
··█████████████··
6+
·███████████████·
7+
·███████████████·
8+
·███████████████·
9+
█████████████████
10+
·███████████████·
11+
·███████████████·
12+
·███████████████·
13+
··█████████████··
14+
··█████████████··
15+
···███████████···
16+
·····███████·····
17+
········█········
1818

19-
█████▓▓▒░▒▓▓█████
20-
███▓▒░░░ ░░░▒▓███
21-
██▓░░ ░░▓██
22-
█▓░ ░▓█
23-
█▒░ ░▒█
24-
▓░ ░▓
25-
▓░ ░▓
26-
░ ░▒
27-
░ ░
28-
░ ░▒
29-
▓░ ░▓
30-
▓░ ░▓
31-
█▒░ ░▒█
32-
█▓░ ░▓█
33-
██▓░░ ░░▓██
34-
███▓▒░░░ ░░░▒▓███
35-
█████▓▓▒░▒▓▓█████
19+
·····░░▒▓▒░░·····
20+
···░▒▓▓▓█▓▓▓▒░···
21+
··░▓▓███████▓▓░··
22+
·░▓███████████▓░·
23+
·▒▓███████████▓▒·
24+
░▓█████████████▓░
25+
░▓█████████████▓░
26+
▓█████████████▓▒
27+
▓███████████████▓
28+
▓█████████████▓▒
29+
░▓█████████████▓░
30+
░▓█████████████▓░
31+
·▒▓███████████▓▒·
32+
·░▓███████████▓░·
33+
··░▓▓███████▓▓░··
34+
···░▒▓▓▓█▓▓▓▒░···
35+
·····░░▒▓▒░░·····
3636

37-
░░░░░░░░░
38-
░░░░░░░░░
39-
░░░░░░░░░
40-
░░░░░░░░░
41-
░░░░░░░░░
42-
░░░░░░░░░
43-
░░░░░░░░░
44-
░░░░░░░░░
45-
░░░░░░░░
46-
░░░░░░░░
47-
░░░░░░░░
48-
░░░░░░░░
49-
░░░░░░░░
50-
░░░░░░░░
51-
░░░░░░░░
52-
░░░░░░░░
53-
░░░░░░░░
37+
████████▓▓▓▓▓▓▓▓▓
38+
████████▓▓▓▓▓▓▓▓▓
39+
████████▓▓▓▓▓▓▓▓▓
40+
████████▓▓▓▓▓▓▓▓▓
41+
████████▓▓▓▓▓▓▓▓▓
42+
████████▓▓▓▓▓▓▓▓▓
43+
████████▓▓▓▓▓▓▓▓▓
44+
████████▓▓▓▓▓▓▓▓▓
45+
▓▓▓▓▓▓▓▓█████████
46+
▓▓▓▓▓▓▓▓█████████
47+
▓▓▓▓▓▓▓▓█████████
48+
▓▓▓▓▓▓▓▓█████████
49+
▓▓▓▓▓▓▓▓█████████
50+
▓▓▓▓▓▓▓▓█████████
51+
▓▓▓▓▓▓▓▓█████████
52+
▓▓▓▓▓▓▓▓█████████
53+
▓▓▓▓▓▓▓▓█████████
5454

55-
████████ ████████
56-
█████▓▓▓ █████
57-
███▓▓▒▒▒ ███
58-
██▓▒▒▒▒▒ ██
59-
██▓▒▒▒▒▒ ██
60-
█▓▒▒▒▒▒▒
61-
█▓▒▒▒▒▒▒
62-
█▓▒▒▒▒▒▒
63-
▒▒▒▒▒▒▒▒
64-
▒▒▒▒▒▒▒▓█
65-
▒▒▒▒▒▒▒▓█
66-
▒▒▒▒▒▒▒▓█
67-
██ ▒▒▒▒▒▒▓██
68-
██ ▒▒▒▒▒▒▓██
69-
███ ▒▒▒▒▓▓███
70-
█████ ▒▓▓▓█████
71-
████████▓████████
55+
········█········
56+
·····░░░████·····
57+
···░░▒▒▒██████···
58+
··░▒▒▒▒▒███████··
59+
··░▒▒▒▒▒███████··
60+
·░▒▒▒▒▒▒████████·
61+
·░▒▒▒▒▒▒████████·
62+
·░▒▒▒▒▒▒████████·
63+
████████▒▒▒▒▒▒▒▒
64+
·███████▒▒▒▒▒▒▒░·
65+
·███████▒▒▒▒▒▒▒░·
66+
·███████▒▒▒▒▒▒▒░·
67+
··██████▒▒▒▒▒▒░··
68+
··██████▒▒▒▒▒▒░··
69+
···█████▒▒▒▒░░···
70+
·····███▒░░░·····
71+
········░········
7272

73-
█████ █ █████
74-
███ ███████ ███
75-
██ ███████████ ██
76-
█ █████████████ █
77-
█ █████████████ █
78-
██████████████
79-
██████████████
80-
██████████████
81-
█████████████████
82-
██████████████
83-
██████████████
84-
██████████████
85-
█ █████████████ █
86-
█ █████████████ █
87-
██ ███████████ ██
88-
███ ███████ ███
89-
█████ █ █████
73+
·····███·███·····
74+
···██·······██···
75+
··█···········█··
76+
·█·············█·
77+
·█·············█·
78+
█···············
79+
█···············
80+
█···············
81+
·················
82+
█···············
83+
█···············
84+
█···············
85+
·█·············█·
86+
·█·············█·
87+
··█···········█··
88+
···██·······██···
89+
·····███·███·····
9090

0 commit comments

Comments
 (0)