File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -751,7 +751,7 @@ def continuous_capture(self):
751
751
or the camera's capture mode is changed"""
752
752
return self .camera .take (1 )
753
753
754
- def blit (self , bitmap ):
754
+ def blit (self , bitmap , x_offset = 0 , y_offset = 32 ):
755
755
"""Display a bitmap direct to the LCD, bypassing displayio
756
756
757
757
This can be more efficient than displaying a bitmap as a displayio
@@ -762,8 +762,12 @@ def blit(self, bitmap):
762
762
for status information.
763
763
"""
764
764
765
- self ._display_bus .send (42 , struct .pack (">hh" , 80 , 80 + bitmap .width - 1 ))
766
- self ._display_bus .send (43 , struct .pack (">hh" , 32 , 32 + bitmap .height - 1 ))
765
+ self ._display_bus .send (
766
+ 42 , struct .pack (">hh" , 80 + x_offset , 80 + x_offset + bitmap .width - 1 )
767
+ )
768
+ self ._display_bus .send (
769
+ 43 , struct .pack (">hh" , y_offset , y_offset + bitmap .height - 1 )
770
+ )
767
771
self ._display_bus .send (44 , bitmap )
768
772
769
773
@property
You can’t perform that action at this time.
0 commit comments