mini_arcade_pygame_backend.ports.capture¶
Capture port implementation for Mini Arcade Native Backend. Provides functionality to capture screenshots in BMP format.
Classes¶
Capture port for the Mini Arcade pygame backend. |
Module Contents¶
- class mini_arcade_pygame_backend.ports.capture.CapturePort(window: mini_arcade_pygame_backend.ports.window.WindowPort)¶
Capture port for the Mini Arcade pygame backend.
- bmp(path: str) bool¶
Capture the current screen and save it as a BMP file.
- Parameters:
path (str) – The file path to save the BMP screenshot.
- Returns:
True if the screenshot was successfully saved, False otherwise.
- Return type:
bool
- argb8888_bytes() tuple[int, int, bytes]¶
Capture the current screen and return the pixel data in ARGB8888 format.
- Returns:
A tuple containing the width, height, and pixel data in ARGB8888 format.
- Return type:
tuple[int, int, bytes]