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 110110# create group
111111
112112long_string = "The purple snake\n brings python fun\n to everyone."
113- short_string = "Hello World"
114113
115114#####
116115# Create the "bitmap_label.py" versions of the text labels.
120119
121120bmap_label1 = bitmap_label .Label (
122121 font = fontToUse ,
123- text = short_string ,
122+ text = "bitmap_label" ,
124123 color = 0xFFFFFF ,
125- max_glyphs = len (short_string ),
126124 background_color = 0xFF0000 ,
127125 padding_bottom = 0 ,
128126 padding_left = 0 ,
155153gc .collect ()
156154bitmap_label_end = gc .mem_free ()
157155
156+ print ("bitmap_label used: {} memory" .format (bitmap_label_start - bitmap_label_end ))
157+
158158bmap_group = displayio .Group (max_size = 4 ) # Create a group for displaying
159159bmap_group .append (bmap_label1 )
160160bmap_group .append (bmap_label2 )
168168
169169label1 = label .Label (
170170 font = fontToUse ,
171- text = short_string ,
171+ text = "label" ,
172172 color = 0xFFFFFF ,
173- max_glyphs = len (short_string ),
174173 background_color = 0xFF0000 ,
175174 padding_bottom = 0 ,
176175 padding_left = 0 ,
203202gc .collect ()
204203label_end = gc .mem_free ()
205204
205+ print ("label used: {} memory" .format (label_start - label_end ))
206206label_group = displayio .Group (max_size = 4 ) # Create a group for displaying
207207label_group .append (label1 )
208208label_group .append (label2 )
You can’t perform that action at this time.
0 commit comments