Merge pull request #7648 from gamblor21/ondiskgif_doc_fix

OnDiskGif Documentation Example fix
This commit is contained in:
MicroDev 2023-02-26 07:36:04 +05:30 committed by GitHub
commit 96ab9ff615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,19 +43,21 @@
//| import displayio
//| import time
//|
//| display = board.DISPLAY
//| splash = displayio.Group()
//| board.DISPLAY.show(splash)
//| display.root_group = splash
//|
//| odg = gifio.OnDiskGif('/sample.gif')
//| odg.next_frame() # Load the first frame
//| face = displayio.TileGrid(odg, pixel_shader=displayio.ColorConverter(input_colorspace=displayio.Colorspace.RGB565))
//| # Depending on your display the next line may need Colorspace.RGB565 instead of Colorspace.RGB565_SWAPPED
//| face = displayio.TileGrid(odg.bitmap, pixel_shader=displayio.ColorConverter(input_colorspace=displayio.Colorspace.RGB565_SWAPPED))
//| splash.append(face)
//| board.DISPLAY.refresh()
//|
//| # Wait forever
//| while True:
//| gif.next_frame()
//| time.sleep(0.1)"""
//| next_delay = odg.next_frame()
//| time.sleep(next_delay)"""
//|
//| def __init__(self, file: str) -> None:
//| """Create an OnDiskGif object with the given file.