ipygame.display
pygame-compatible display module.
def init() -> NoneInitialise the display module.
def quit() -> NoneUninitialise the display module.
get_init
Section titled “get_init”def get_init() -> boolset_mode
Section titled “set_mode”def set_mode(size: tuple[int, int] = (0, 0), flags: int = 0, depth: int = 0, display: int = 0, vsync: int = 0) -> SurfaceCreate a display Surface backed by an ipycanvas Canvas.
The canvas widget is automatically shown in the notebook output.
get_surface
Section titled “get_surface”def get_surface() -> Surface | NoneReturn the current display Surface, or None.
def flip() -> NoneUpdate the full display Surface to the canvas.
update
Section titled “update”def update(rectangle=None) -> NoneUpdate portions of the display (or the full display if rectangle is None).
set_caption
Section titled “set_caption”def set_caption(title: str, icontitle: str = "") -> Noneget_caption
Section titled “get_caption”def get_caption() -> tuple[str, str]set_icon
Section titled “set_icon”def set_icon(surface: Surface) -> Noneiconify
Section titled “iconify”def iconify() -> booltoggle_fullscreen
Section titled “toggle_fullscreen”def toggle_fullscreen() -> int_VidInfo Objects
Section titled “_VidInfo Objects”class _VidInfo()Minimal video-info object returned by Info().
__init__
Section titled “__init__”def __init__(w: int, h: int)def Info() -> _VidInfoget_driver
Section titled “get_driver”def get_driver() -> strget_window_size
Section titled “get_window_size”def get_window_size() -> tuple[int, int]