@@ -9,19 +9,19 @@ from typing import (
9
9
)
10
10
11
11
from pygame import Rect , FRect
12
- from pygame .typing import Coordinate , RectLike , SequenceLike
12
+ from pygame .typing import Point , RectLike , SequenceLike
13
13
from .rect import Rect , FRect
14
14
from .math import Vector2
15
15
16
- _CanBeCircle = Union [Circle , Tuple [Coordinate , float ], SequenceLike [float ]]
16
+ _CanBeCircle = Union [Circle , Tuple [Point , float ], SequenceLike [float ]]
17
17
18
18
class _HasCirclettribute (Protocol ):
19
19
# An object that has a circle attribute that is either a circle, or a function
20
20
# that returns a circle
21
21
circle : Union [_CanBeCircle , Callable [[], _CanBeCircle ]]
22
22
23
23
_CircleValue = Union [_CanBeCircle , _HasCirclettribute ]
24
- _CanBeCollided = Union [Circle , Rect , FRect , Coordinate , Vector2 ]
24
+ _CanBeCollided = Union [Circle , Rect , FRect , Point , Vector2 ]
25
25
_CanBeIntersected = Union [Circle ]
26
26
27
27
class Circle :
@@ -64,53 +64,53 @@ class Circle:
64
64
@property
65
65
def center (self ) -> Tuple [float , float ]: ...
66
66
@center .setter
67
- def center (self , value : Coordinate ) -> None : ...
67
+ def center (self , value : Point ) -> None : ...
68
68
@property
69
69
def top (self ) -> Tuple [float , float ]: ...
70
70
@top .setter
71
- def top (self , value : Coordinate ) -> None : ...
71
+ def top (self , value : Point ) -> None : ...
72
72
@property
73
73
def left (self ) -> Tuple [float , float ]: ...
74
74
@left .setter
75
- def left (self , value : Coordinate ) -> None : ...
75
+ def left (self , value : Point ) -> None : ...
76
76
@property
77
77
def bottom (self ) -> Tuple [float , float ]: ...
78
78
@bottom .setter
79
- def bottom (self , value : Coordinate ) -> None : ...
79
+ def bottom (self , value : Point ) -> None : ...
80
80
@property
81
81
def right (self ) -> Tuple [float , float ]: ...
82
82
@right .setter
83
- def right (self , value : Coordinate ) -> None : ...
83
+ def right (self , value : Point ) -> None : ...
84
84
@overload
85
85
def __init__ (self , x : float , y : float , r : float ) -> None : ...
86
86
@overload
87
- def __init__ (self , pos : Coordinate , r : float ) -> None : ...
87
+ def __init__ (self , pos : Point , r : float ) -> None : ...
88
88
@overload
89
89
def __init__ (self , circle : _CircleValue ) -> None : ...
90
90
@overload
91
91
def move (self , x : float , y : float , / ) -> Circle : ...
92
92
@overload
93
- def move (self , move_by : Coordinate , / ) -> Circle : ...
93
+ def move (self , move_by : Point , / ) -> Circle : ...
94
94
@overload
95
95
def move_ip (self , x : float , y : float , / ) -> None : ...
96
96
@overload
97
- def move_ip (self , move_by : Coordinate , / ) -> None : ...
97
+ def move_ip (self , move_by : Point , / ) -> None : ...
98
98
@overload
99
99
def collidepoint (self , x : float , y : float , / ) -> bool : ...
100
100
@overload
101
- def collidepoint (self , point : Coordinate , / ) -> bool : ...
101
+ def collidepoint (self , point : Point , / ) -> bool : ...
102
102
@overload
103
103
def collidecircle (self , circle : _CircleValue , / ) -> bool : ...
104
104
@overload
105
105
def collidecircle (self , x : float , y : float , r : float , / ) -> bool : ...
106
106
@overload
107
- def collidecircle (self , center : Coordinate , r : float , / ) -> bool : ...
107
+ def collidecircle (self , center : Point , r : float , / ) -> bool : ...
108
108
@overload
109
109
def colliderect (self , rect : RectLike , / ) -> bool : ...
110
110
@overload
111
111
def colliderect (self , x : float , y : float , w : float , h : float , / ) -> bool : ...
112
112
@overload
113
- def colliderect (self , topleft : Coordinate , size : Coordinate , / ) -> bool : ...
113
+ def colliderect (self , topleft : Point , size : Point , / ) -> bool : ...
114
114
def collideswith (self , other : _CanBeCollided , / ) -> bool : ...
115
115
def collidelist (self , colliders : Sequence [_CanBeCollided ], / ) -> int : ...
116
116
def collidelistall (self , colliders : Sequence [_CanBeCollided ], / ) -> List [int ]: ...
@@ -121,13 +121,13 @@ class Circle:
121
121
@overload
122
122
def update (self , x : float , y : float , r : float , / ) -> None : ...
123
123
@overload
124
- def update (self , center : Coordinate , r : float , / ) -> None : ...
124
+ def update (self , center : Point , r : float , / ) -> None : ...
125
125
@overload
126
- def rotate (self , angle : float , rotation_point : Coordinate , / ) -> Circle : ...
126
+ def rotate (self , angle : float , rotation_point : Point , / ) -> Circle : ...
127
127
@overload
128
128
def rotate (self , angle : float , / ) -> Circle : ...
129
129
@overload
130
- def rotate_ip (self , angle : float , rotation_point : Coordinate , / ) -> None : ...
130
+ def rotate_ip (self , angle : float , rotation_point : Point , / ) -> None : ...
131
131
@overload
132
132
def rotate_ip (self , angle : float , / ) -> None : ...
133
133
def as_rect (self ) -> Rect : ...
0 commit comments