]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - displayio/_ondiskbitmap.py
Fix indexed bitmaps by correcting argument order at call
[hackapet/Adafruit_Blinka_Displayio.git] / displayio / _ondiskbitmap.py
index 67c7e08289cfa8156a3ceecd97b9299a99940423..00ea76511b0b3e10907b5513586a17a7fd49d28d 100644 (file)
@@ -35,9 +35,6 @@ class OnDiskBitmap:
     load times. These load times may result in frame tearing where only part of the image is
     visible.
 
     load times. These load times may result in frame tearing where only part of the image is
     visible.
 
-    It's easiest to use on a board with a built in display such as the `Hallowing M0 Express
-    <https://www.adafruit.com/product/3900>`_.
-
     .. code-block:: Python
 
         import board
     .. code-block:: Python
 
         import board
@@ -48,7 +45,7 @@ class OnDiskBitmap:
         board.DISPLAY.auto_brightness = False
         board.DISPLAY.brightness = 0
         splash = displayio.Group()
         board.DISPLAY.auto_brightness = False
         board.DISPLAY.brightness = 0
         splash = displayio.Group()
-        board.DISPLAY.show(splash)
+        board.DISPLAY.root_group = splash
 
         odb = displayio.OnDiskBitmap(\'/sample.bmp\')
         face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
 
         odb = displayio.OnDiskBitmap(\'/sample.bmp\')
         face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
@@ -145,7 +142,7 @@ class OnDiskBitmap:
 
                     for i in range(number_of_colors):
                         palette._set_color(
 
                     for i in range(number_of_colors):
                         palette._set_color(
-                            palette_data[i], i
+                            i, palette_data[i]
                         )  # pylint: disable=protected-access
                 else:
                     palette._set_color(0x000000, 0)  # pylint: disable=protected-access
                         )  # pylint: disable=protected-access
                 else:
                     palette._set_color(0x000000, 0)  # pylint: disable=protected-access