1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
from typing import Union, Optional, Tuple, List, Sequence
from typing_extensions import Protocol
from pygame.color import Color
from pygame.rect import Rect
from pygame.surface import Surface
from pygame.math import Vector2
_Coordinate = Union[Tuple[float, float], List[float], Vector2]
_ColorValue = Union[
Color, str, Tuple[int, int, int], List[int], int, Tuple[int, int, int, int]
]
_CanBeRect = Union[
Rect,
Tuple[int, int, int, int], List[int],
Tuple[_Coordinate, _Coordinate], List[_Coordinate]
]
class _HasRectAttribute(Protocol):
rect: _CanBeRect
_RectValue = Union[
_CanBeRect, _HasRectAttribute
]
def rect(
surface: Surface,
color: _ColorValue,
rect: _RectValue,
width: Optional[int] = 0,
border_radius: Optional[int] = -1,
border_top_left_radius: Optional[int] = -1,
border_top_right_radius: Optional[int] = -1,
border_bottom_left_radius: Optional[int] = -1,
border_bottom_right_radius: Optional[int] = -1,
) -> Rect: ...
def polygon(
surface: Surface,
color: _ColorValue,
points: Sequence[_Coordinate],
width: Optional[int] = 0,
) -> Rect: ...
def circle(
surface: Surface,
color: _ColorValue,
center: _Coordinate,
radius: float,
width: Optional[int] = 0,
draw_top_right: Optional[bool] = None,
draw_top_left: Optional[bool] = None,
draw_bottom_left: Optional[bool] = None,
draw_bottom_right: Optional[bool] = None,
) -> Rect: ...
def ellipse(
surface: Surface, color: _ColorValue, rect: _RectValue, width: Optional[int] = 0
) -> Rect: ...
def arc(
surface: Surface,
color: _ColorValue,
rect: _RectValue,
start_angle: float,
stop_angle: float,
width: Optional[int] = 1,
) -> Rect: ...
def line(
surface: Surface,
color: _ColorValue,
start_pos: _Coordinate,
end_pos: _Coordinate,
width: Optional[int] = 1,
) -> Rect: ...
def lines(
surface: Surface,
color: _ColorValue,
closed: bool,
points: Sequence[_Coordinate],
width: Optional[int] = 1,
) -> Rect: ...
def aaline(
surface: Surface,
color: _ColorValue,
start_pos: _Coordinate,
end_pos: _Coordinate,
blend: Optional[int] = 1,
) -> Rect: ...
def aalines(
surface: Surface,
color: _ColorValue,
closed: bool,
points: Sequence[_Coordinate],
blend: Optional[int] = 1,
) -> Rect: ...
|