File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 110
110
# create group
111
111
112
112
long_string = "The purple snake\n brings python fun\n to everyone."
113
- short_string = "Hello World"
114
113
115
114
#####
116
115
# Create the "bitmap_label.py" versions of the text labels.
120
119
121
120
bmap_label1 = bitmap_label .Label (
122
121
font = fontToUse ,
123
- text = short_string ,
122
+ text = "bitmap_label" ,
124
123
color = 0xFFFFFF ,
125
- max_glyphs = len (short_string ),
126
124
background_color = 0xFF0000 ,
127
125
padding_bottom = 0 ,
128
126
padding_left = 0 ,
155
153
gc .collect ()
156
154
bitmap_label_end = gc .mem_free ()
157
155
156
+ print ("bitmap_label used: {} memory" .format (bitmap_label_start - bitmap_label_end ))
157
+
158
158
bmap_group = displayio .Group (max_size = 4 ) # Create a group for displaying
159
159
bmap_group .append (bmap_label1 )
160
160
bmap_group .append (bmap_label2 )
168
168
169
169
label1 = label .Label (
170
170
font = fontToUse ,
171
- text = short_string ,
171
+ text = "label" ,
172
172
color = 0xFFFFFF ,
173
- max_glyphs = len (short_string ),
174
173
background_color = 0xFF0000 ,
175
174
padding_bottom = 0 ,
176
175
padding_left = 0 ,
203
202
gc .collect ()
204
203
label_end = gc .mem_free ()
205
204
205
+ print ("label used: {} memory" .format (label_start - label_end ))
206
206
label_group = displayio .Group (max_size = 4 ) # Create a group for displaying
207
207
label_group .append (label1 )
208
208
label_group .append (label2 )
You can’t perform that action at this time.
0 commit comments