bro
This commit is contained in:
1 parent
de41a02749
commit
9af09cebd3
764 files changed
+54218
-78859
No files matched your search
@@ -1,18 +1,16 @@
|
||||
from collections.abc import Generator, Iterable
|
||||
from typing import Any
|
||||
from typing import Any, Generator, Iterable, Optional, Tuple, Union
|
||||
|
||||
from pygame.color import Color
|
||||
from pygame.rect import Rect
|
||||
from pygame.surface import Surface
|
||||
from pygame.typing import ColorLike, Point, RectLike
|
||||
from pygame.window import Window as Window
|
||||
|
||||
from .._common import RectValue, Literal, ColorValue
|
||||
|
||||
WINDOWPOS_UNDEFINED: int
|
||||
WINDOWPOS_CENTERED: int
|
||||
|
||||
SCALEQUALITY_NEAREST: int
|
||||
SCALEQUALITY_LINEAR: int
|
||||
SCALEQUALITY_BEST: int
|
||||
MESSAGEBOX_ERROR: int
|
||||
MESSAGEBOX_WARNING: int
|
||||
MESSAGEBOX_INFORMATION: int
|
||||
|
||||
class RendererDriverInfo:
|
||||
name: str
|
||||
@@ -22,18 +20,64 @@ class RendererDriverInfo:
|
||||
max_texture_height: int
|
||||
|
||||
def get_drivers() -> Generator[RendererDriverInfo, None, None]: ...
|
||||
def get_grabbed_window() -> Window | None: ...
|
||||
def get_grabbed_window() -> Optional[Window]: ...
|
||||
def messagebox(
|
||||
title: str,
|
||||
message: str,
|
||||
window: Optional[Window] = None,
|
||||
info: bool = False,
|
||||
warn: bool = False,
|
||||
error: bool = False,
|
||||
buttons: Tuple[str, ...] = ("OK",),
|
||||
return_button: int = 0,
|
||||
escape_button: int = 0,
|
||||
) -> int: ...
|
||||
|
||||
class Window:
|
||||
DEFAULT_SIZE: Tuple[Literal[640], Literal[480]]
|
||||
def __init__(
|
||||
self,
|
||||
title: str = "pygame",
|
||||
size: Iterable[int] = (640, 480),
|
||||
position: Optional[Iterable[int]] = None,
|
||||
fullscreen: bool = False,
|
||||
fullscreen_desktop: bool = False,
|
||||
**kwargs: bool
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_display_module(cls) -> Window: ...
|
||||
@classmethod
|
||||
def from_window(cls, other: int) -> Window: ...
|
||||
grab: bool
|
||||
relative_mouse: bool
|
||||
def set_windowed(self) -> None: ...
|
||||
def set_fullscreen(self, desktop: bool = False) -> None: ...
|
||||
title: str
|
||||
def destroy(self) -> None: ...
|
||||
def hide(self) -> None: ...
|
||||
def show(self) -> None: ...
|
||||
def focus(self, input_only: bool = False) -> None: ...
|
||||
def restore(self) -> None: ...
|
||||
def maximize(self) -> None: ...
|
||||
def minimize(self) -> None: ...
|
||||
resizable: bool
|
||||
borderless: bool
|
||||
def set_icon(self, surface: Surface) -> None: ...
|
||||
id: int
|
||||
size: Iterable[int]
|
||||
position: Union[int, Iterable[int]]
|
||||
opacity: float
|
||||
display_index: int
|
||||
def set_modal_for(self, parent: Window) -> None: ...
|
||||
|
||||
class Texture:
|
||||
def __init__(
|
||||
self,
|
||||
renderer: Renderer,
|
||||
size: Iterable[int],
|
||||
depth: int = 0,
|
||||
static: bool = False,
|
||||
streaming: bool = False,
|
||||
target: bool = False,
|
||||
scale_quality: int | None = None,
|
||||
) -> None: ...
|
||||
@staticmethod
|
||||
def from_surface(renderer: Renderer, surface: Surface) -> Texture: ...
|
||||
@@ -42,74 +86,39 @@ class Texture:
|
||||
height: int
|
||||
alpha: int
|
||||
blend_mode: int
|
||||
|
||||
@property
|
||||
def color(self) -> Color: ...
|
||||
@color.setter
|
||||
def color(self, value: ColorLike) -> None: ...
|
||||
color: ColorValue
|
||||
def get_rect(self, **kwargs: Any) -> Rect: ...
|
||||
def draw(
|
||||
self,
|
||||
srcrect: RectLike | None = None,
|
||||
dstrect: RectLike | None = None,
|
||||
srcrect: Optional[RectValue] = None,
|
||||
dstrect: Optional[RectValue] = None,
|
||||
angle: float = 0.0,
|
||||
origin: Iterable[int] | None = None,
|
||||
origin: Optional[Iterable[int]] = None,
|
||||
flip_x: bool = False,
|
||||
flip_y: bool = False,
|
||||
) -> None: ...
|
||||
def draw_triangle(
|
||||
self,
|
||||
p1_xy: Point,
|
||||
p2_xy: Point,
|
||||
p3_xy: Point,
|
||||
p1_uv: Point = (0.0, 0.0),
|
||||
p2_uv: Point = (1.0, 1.0),
|
||||
p3_uv: Point = (0.0, 1.0),
|
||||
p1_mod: Iterable[int] = (255, 255, 255, 255),
|
||||
p2_mod: Iterable[int] = (255, 255, 255, 255),
|
||||
p3_mod: Iterable[int] = (255, 255, 255, 255),
|
||||
) -> None: ...
|
||||
def draw_quad(
|
||||
self,
|
||||
p1_xy: Point,
|
||||
p2_xy: Point,
|
||||
p3_xy: Point,
|
||||
p4_xy: Point,
|
||||
p1_uv: Point = (0.0, 0.0),
|
||||
p2_uv: Point = (1.0, 0.0),
|
||||
p3_uv: Point = (1.0, 1.0),
|
||||
p4_uv: Point = (0.0, 1.0),
|
||||
p1_mod: Iterable[int] = (255, 255, 255, 255),
|
||||
p2_mod: Iterable[int] = (255, 255, 255, 255),
|
||||
p3_mod: Iterable[int] = (255, 255, 255, 255),
|
||||
p4_mod: Iterable[int] = (255, 255, 255, 255),
|
||||
) -> None: ...
|
||||
def update(self, surface: Surface, area: RectLike | None = None) -> None: ...
|
||||
def update(self, surface: Surface, area: Optional[RectValue] = None) -> None: ...
|
||||
|
||||
class Image:
|
||||
def __init__(
|
||||
self,
|
||||
texture_or_image: Texture | Image,
|
||||
srcrect: RectLike | None = None,
|
||||
textureOrImage: Union[Texture, Image],
|
||||
srcrect: Optional[RectValue] = None,
|
||||
) -> None: ...
|
||||
def get_rect(self) -> Rect: ...
|
||||
def get_rect(self, **kwargs: Any) -> Rect: ...
|
||||
def draw(
|
||||
self, srcrect: RectLike | None = None, dstrect: RectLike | None = None
|
||||
self, srcrect: Optional[RectValue] = None, dstrect: Optional[RectValue] = None
|
||||
) -> None: ...
|
||||
angle: float
|
||||
origin: Iterable[float] | None
|
||||
origin: Optional[Iterable[float]]
|
||||
flip_x: bool
|
||||
flip_y: bool
|
||||
color: ColorValue
|
||||
alpha: float
|
||||
blend_mode: int
|
||||
texture: Texture
|
||||
srcrect: Rect
|
||||
|
||||
@property
|
||||
def color(self) -> Color: ...
|
||||
@color.setter
|
||||
def color(self, value: ColorLike) -> None: ...
|
||||
|
||||
class Renderer:
|
||||
def __init__(
|
||||
self,
|
||||
@@ -122,38 +131,29 @@ class Renderer:
|
||||
@classmethod
|
||||
def from_window(cls, window: Window) -> Renderer: ...
|
||||
draw_blend_mode: int
|
||||
@property
|
||||
def draw_color(self) -> Color: ...
|
||||
@draw_color.setter
|
||||
def draw_color(self, value: ColorLike) -> None: ...
|
||||
draw_color: ColorValue
|
||||
def clear(self) -> None: ...
|
||||
def present(self) -> None: ...
|
||||
def get_viewport(self) -> Rect: ...
|
||||
def set_viewport(self, area: RectLike | None) -> None: ...
|
||||
def set_viewport(self, area: Optional[RectValue]) -> None: ...
|
||||
logical_size: Iterable[int]
|
||||
def coordinates_to_window(self, point: Point) -> tuple[float, float]: ...
|
||||
def coordinates_from_window(self, point: Point) -> tuple[float, float]: ...
|
||||
scale: Iterable[float]
|
||||
target: Texture | None
|
||||
target: Optional[Texture]
|
||||
def blit(
|
||||
self,
|
||||
source: Texture | Image,
|
||||
dest: RectLike | None = None,
|
||||
area: RectLike | None = None,
|
||||
source: Union[Texture, Image],
|
||||
dest: Optional[RectValue] = None,
|
||||
area: Optional[RectValue] = None,
|
||||
special_flags: int = 0,
|
||||
) -> Rect: ...
|
||||
def draw_line(self, p1: Point, p2: Point) -> None: ...
|
||||
def draw_point(self, point: Point) -> None: ...
|
||||
def draw_rect(self, rect: RectLike) -> None: ...
|
||||
def fill_rect(self, rect: RectLike) -> None: ...
|
||||
def draw_triangle(self, p1: Point, p2: Point, p3: Point) -> None: ...
|
||||
def fill_triangle(self, p1: Point, p2: Point, p3: Point) -> None: ...
|
||||
def draw_quad(self, p1: Point, p2: Point, p3: Point, p4: Point) -> None: ...
|
||||
def fill_quad(self, p1: Point, p2: Point, p3: Point, p4: Point) -> None: ...
|
||||
def draw_line(self, p1: Iterable[int], p2: Iterable[int]) -> None: ...
|
||||
def draw_point(self, point: Iterable[int]) -> None: ...
|
||||
def draw_rect(self, rect: RectValue) -> None: ...
|
||||
def fill_rect(self, rect: RectValue) -> None: ...
|
||||
def to_surface(
|
||||
self, surface: Surface | None = None, area: RectLike | None = None
|
||||
self, surface: Optional[Surface] = None, area: Optional[RectValue] = None
|
||||
) -> Surface: ...
|
||||
@staticmethod
|
||||
def compose_custom_blend_mode(
|
||||
color_mode: tuple[int, int, int], alpha_mode: tuple[int, int, int]
|
||||
color_mode: Tuple[int, int, int], alpha_mode: Tuple[int, int, int]
|
||||
) -> int: ...
|
||||
Reference in new issue
Block a user