Skip to content

Commit 9020acb

Browse files
authored
Merge pull request #23 from lesamouraipourpre/max-size
Remove max_size parameter
2 parents 8d6ad2e + 92e20ac commit 9020acb

11 files changed

+75
-19
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Usage Example
4848
display = ST7789(display_bus, width=240, height=240, rowstart=80)
4949
5050
# Make the display context
51-
splash = displayio.Group(max_size=10)
51+
splash = displayio.Group()
5252
display.show(splash)
5353
5454
color_bitmap = displayio.Bitmap(240, 240, 1)

docs/examples.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,62 @@ Ensure your device works with this simple test.
66
.. literalinclude:: ../examples/st7789_simpletest.py
77
:caption: examples/st7789_simpletest.py
88
:linenos:
9+
10+
240x135
11+
=======
12+
13+
.. literalinclude:: ../examples/st7789_240x135_simpletest.py
14+
:caption: examples/st7789_240x135_simpletest.py
15+
:linenos:
16+
17+
320x240
18+
=======
19+
20+
.. literalinclude:: ../examples/st7789_320x240_simpletest.py
21+
:caption: examples/st7789_320x240_simpletest.py
22+
:linenos:
23+
24+
Product specific examples
25+
-------------------------
26+
27+
1.14" Mini PiTFT
28+
================
29+
30+
.. literalinclude:: ../examples/st7789_240x135_pitft_simpletest.py
31+
:caption: examples/st7789_240x135_pitft_simpletest.py
32+
:linenos:
33+
34+
1.3" TFT Bonnet
35+
===============
36+
37+
.. literalinclude:: ../examples/st7789_240x240_bonnet_simpletest.py
38+
:caption: examples/st7789_240x240_bonnet_simpletest.py
39+
:linenos:
40+
41+
1.3" PiTFT
42+
==========
43+
44+
.. literalinclude:: ../examples/st7789_240x240_pitft_simpletest.py
45+
:caption: examples/st7789_240x240_pitft_simpletest.py
46+
:linenos:
47+
48+
Gizmo
49+
=====
50+
51+
.. literalinclude:: ../examples/st7789_tft_gizmo_simpletest.py
52+
:caption: examples/st7789_tft_gizmo_simpletest.py
53+
:linenos:
54+
55+
Pimoroni Pico Display Pack
56+
==========================
57+
58+
.. literalinclude:: ../examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py
59+
:caption: examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py
60+
:linenos:
61+
62+
Pimoroni Pico Explorer
63+
======================
64+
65+
.. literalinclude:: ../examples/st7789_240x240_simpletest_Pimoroni_Pico_Explorer.py
66+
:caption: examples/st7789_240x240_simpletest_Pimoroni_Pico_Explorer.py
67+
:linenos:

examples/st7789_240x135_pitft_simpletest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
)
3434

3535
# Make the display context
36-
splash = displayio.Group(max_size=10)
36+
splash = displayio.Group()
3737
display.show(splash)
3838

3939
color_bitmap = displayio.Bitmap(display.width, display.height, 1)
@@ -59,7 +59,6 @@
5959
text_area = label.Label(terminalio.FONT, text=text, color=TEXT_COLOR)
6060
text_width = text_area.bounding_box[2] * FONTSCALE
6161
text_group = displayio.Group(
62-
max_size=10,
6362
scale=FONTSCALE,
6463
x=display.width // 2 - text_width // 2,
6564
y=display.height // 2,

examples/st7789_240x135_simpletest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
)
3232

3333
# Make the display context
34-
splash = displayio.Group(max_size=10)
34+
splash = displayio.Group()
3535
display.show(splash)
3636

3737
color_bitmap = displayio.Bitmap(display.width, display.height, 1)
@@ -57,7 +57,6 @@
5757
text_area = label.Label(terminalio.FONT, text=text, color=TEXT_COLOR)
5858
text_width = text_area.bounding_box[2] * FONTSCALE
5959
text_group = displayio.Group(
60-
max_size=10,
6160
scale=FONTSCALE,
6261
x=display.width // 2 - text_width // 2,
6362
y=display.height // 2,

examples/st7789_240x135_simpletest_Pimoroni_Pico_Display_Pack.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
)
3131

3232
# Make the display context
33-
splash = displayio.Group(max_size=10)
33+
splash = displayio.Group()
3434
display.show(splash)
3535

3636
color_bitmap = displayio.Bitmap(display.width, display.height, 1)
@@ -56,7 +56,6 @@
5656
text_area = label.Label(terminalio.FONT, text=text, color=TEXT_COLOR)
5757
text_width = text_area.bounding_box[2] * FONTSCALE
5858
text_group = displayio.Group(
59-
max_size=10,
6059
scale=FONTSCALE,
6160
x=display.width // 2 - text_width // 2,
6261
y=display.height // 2,

examples/st7789_240x240_bonnet_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
)
3434

3535
# Make the display context
36-
splash = displayio.Group(max_size=10)
36+
splash = displayio.Group()
3737
display.show(splash)
3838

3939
color_bitmap = displayio.Bitmap(240, 240, 1)
@@ -51,7 +51,7 @@
5151
splash.append(inner_sprite)
5252

5353
# Draw a label
54-
text_group = displayio.Group(max_size=10, scale=2, x=50, y=120)
54+
text_group = displayio.Group(scale=2, x=50, y=120)
5555
text = "Hello World!"
5656
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
5757
text_group.append(text_area) # Subgroup for text scaling

examples/st7789_240x240_pitft_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
display = ST7789(display_bus, width=240, height=240, rowstart=80, rotation=180)
2626

2727
# Make the display context
28-
splash = displayio.Group(max_size=10)
28+
splash = displayio.Group()
2929
display.show(splash)
3030

3131
color_bitmap = displayio.Bitmap(240, 240, 1)
@@ -43,7 +43,7 @@
4343
splash.append(inner_sprite)
4444

4545
# Draw a label
46-
text_group = displayio.Group(max_size=10, scale=2, x=50, y=120)
46+
text_group = displayio.Group(scale=2, x=50, y=120)
4747
text = "Hello World!"
4848
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
4949
text_group.append(text_area) # Subgroup for text scaling

examples/st7789_240x240_simpletest_Pimoroni_Pico_Explorer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
display = ST7789(display_bus, width=240, height=240, rowstart=80, rotation=180)
2727

2828
# Make the display context
29-
splash = displayio.Group(max_size=10)
29+
splash = displayio.Group()
3030
display.show(splash)
3131

3232
color_bitmap = displayio.Bitmap(240, 240, 1)
@@ -44,7 +44,7 @@
4444
splash.append(inner_sprite)
4545

4646
# Draw a label
47-
text_group = displayio.Group(max_size=10, scale=2, x=50, y=120)
47+
text_group = displayio.Group(scale=2, x=50, y=120)
4848
text = "Hello World!"
4949
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
5050
text_group.append(text_area) # Subgroup for text scaling

examples/st7789_320x240_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
display = ST7789(display_bus, width=320, height=240, rotation=90)
2626

2727
# Make the display context
28-
splash = displayio.Group(max_size=10)
28+
splash = displayio.Group()
2929
display.show(splash)
3030

3131
color_bitmap = displayio.Bitmap(320, 240, 1)
@@ -43,7 +43,7 @@
4343
splash.append(inner_sprite)
4444

4545
# Draw a label
46-
text_group = displayio.Group(max_size=10, scale=3, x=57, y=120)
46+
text_group = displayio.Group(scale=3, x=57, y=120)
4747
text = "Hello World!"
4848
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
4949
text_group.append(text_area) # Subgroup for text scaling

examples/st7789_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
display = ST7789(display_bus, width=240, height=240, rowstart=80)
2626

2727
# Make the display context
28-
splash = displayio.Group(max_size=10)
28+
splash = displayio.Group()
2929
display.show(splash)
3030

3131
color_bitmap = displayio.Bitmap(240, 240, 1)
@@ -43,7 +43,7 @@
4343
splash.append(inner_sprite)
4444

4545
# Draw a label
46-
text_group = displayio.Group(max_size=10, scale=2, x=50, y=120)
46+
text_group = displayio.Group(scale=2, x=50, y=120)
4747
text = "Hello World!"
4848
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
4949
text_group.append(text_area) # Subgroup for text scaling

examples/st7789_tft_gizmo_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
)
3333

3434
# Make the display context
35-
splash = displayio.Group(max_size=10)
35+
splash = displayio.Group()
3636
display.show(splash)
3737

3838
color_bitmap = displayio.Bitmap(240, 240, 1)
@@ -50,7 +50,7 @@
5050
splash.append(inner_sprite)
5151

5252
# Draw a label
53-
text_group = displayio.Group(max_size=10, scale=2, x=50, y=120)
53+
text_group = displayio.Group(scale=2, x=50, y=120)
5454
text = "Hello World!"
5555
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
5656
text_group.append(text_area) # Subgroup for text scaling

0 commit comments

Comments
 (0)