displaydev.pgdisplay
displaydev.pgdisplay
- displaydev.pgdisplay.poll_event()[source]
Non-blocking poll; return one events event or
None(not for QUEUEread).
- class displaydev.pgdisplay.PGDisplay(width=320, height=240, rotation=0, color_depth=16, title='displaydev', scale=1.0, window_flags=pygame.SHOWN, *, quiet=False)[source]
Bases:
FrameRecorderMixin,DesktopDisplayEmulate an LCD window with pygame-ce (
pygame.Window).Requires pygame-ce with public
Window.get_surface/Window.flip(nopygame._sdl2). Provides scrolling and rotation similar to a panel driver; scale is reduced when the window would not fit the desktop work area.- Parameters:
width (int, optional) – Panel width in pixels. Defaults to 320.
height (int, optional) – Panel height in pixels. Defaults to 240.
rotation (int, optional) – Rotation in degrees. Defaults to 0.
color_depth (int, optional) – Bits per pixel. Defaults to 16.
title (str, optional) – Window title. Defaults to
"displaydev".scale (float, optional) – Window scale factor. Defaults to 1.0.
window_flags (int, optional) – pygame display flags. Defaults to
pg.SHOWN.quiet (bool) – Suppress init chatter when True.
- blit_rect(buffer, x, y, w, h)[source]
Blit a buffer into the logical framebuffer. Compositing is deferred until
show().
- fill_rect(x, y, w, h, c)[source]
Fill a rectangle in the logical framebuffer. Compositing is deferred until
show().