@@ -378,7 +378,8 @@ def __init__(self, *, url=None, headers=None, json_path=None, regexp_path=None,
378
378
if not self ._image_position :
379
379
self ._image_position = (0 , 0 ) # default to top corner
380
380
if not self ._image_resize :
381
- self ._image_resize = (320 , 240 ) # default to full screen
381
+ self ._image_resize = (board .DISPLAY .width ,
382
+ board .DISPLAY .height ) # default to full screen
382
383
if hasattr (board , 'TOUCH_XL' ):
383
384
if self ._debug :
384
385
print ("Init touchscreen" )
@@ -387,7 +388,8 @@ def __init__(self, *, url=None, headers=None, json_path=None, regexp_path=None,
387
388
board .TOUCH_YD , board .TOUCH_YU ,
388
389
calibration = ((5200 , 59000 ),
389
390
(5800 , 57000 )),
390
- size = (320 , 240 ))
391
+ size = (board .DISPLAY .width ,
392
+ board .DISPLAY .height ))
391
393
# pylint: enable=no-member
392
394
393
395
self .set_backlight (1.0 ) # turn on backlight
@@ -439,7 +441,7 @@ def set_background(self, file_or_color, position=None):
439
441
x = position [0 ], y = position [1 ])
440
442
elif isinstance (file_or_color , int ):
441
443
# Make a background color fill
442
- color_bitmap = displayio .Bitmap (320 , 240 , 1 )
444
+ color_bitmap = displayio .Bitmap (board . DISPLAY . width , board . DISPLAY . height , 1 )
443
445
color_palette = displayio .Palette (1 )
444
446
color_palette [0 ] = file_or_color
445
447
try :
0 commit comments