You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. versionchanged:: 2.2 Since version 2.2 there is another class called FRect that serves the same purpose as as `Rect` but it can hold floats instead of integers.
20
19
21
20
Pygame uses Rect objects to store and manipulate rectangular areas. A Rect
22
21
can be created from a combination of left, top, width, and height values.
@@ -563,4 +562,4 @@ purpose as as `Rect` but it can hold floats instead of integers.
#defineDOC_RECT_RECT_COPY "copy() -> Rect\ncopy the rectangle"
5
-
#defineDOC_RECT_RECT_MOVE "move(x, y) -> Rect\nmoves the rectangle"
6
-
#defineDOC_RECT_RECT_MOVEIP "move_ip(x, y) -> None\nmoves the rectangle, in place"
7
-
#defineDOC_RECT_RECT_INFLATE "inflate(x, y) -> Rect\ngrow or shrink the rectangle size"
8
-
#defineDOC_RECT_RECT_INFLATEIP "inflate_ip(x, y) -> None\ngrow or shrink the rectangle size, in place"
9
-
#defineDOC_RECT_RECT_UPDATE "update(left, top, width, height) -> None\nupdate((left, top), (width, height)) -> None\nupdate(object) -> None\nsets the position and size of the rectangle"
10
-
#defineDOC_RECT_RECT_CLAMP "clamp(Rect) -> Rect\nmoves the rectangle inside another"
11
-
#defineDOC_RECT_RECT_CLAMPIP "clamp_ip(Rect) -> None\nmoves the rectangle inside another, in place"
12
-
#defineDOC_RECT_RECT_CLIP "clip(Rect) -> Rect\ncrops a rectangle inside another"
#defineDOC_RECT_RECT_CONTAINS "contains(Rect) -> bool\ntest if one rectangle is inside another"
21
-
#defineDOC_RECT_RECT_COLLIDEPOINT "collidepoint(x, y) -> bool\ncollidepoint((x,y)) -> bool\ntest if a point is inside a rectangle"
22
-
#defineDOC_RECT_RECT_COLLIDERECT "colliderect(Rect) -> bool\ntest if two rectangles overlap"
23
-
#defineDOC_RECT_RECT_COLLIDELIST "collidelist(list) -> index\ntest if one rectangle in a list intersects"
24
-
#defineDOC_RECT_RECT_COLLIDELISTALL "collidelistall(list) -> indices\ntest if all rectangles in a list intersect"
25
-
#defineDOC_RECT_RECT_COLLIDEOBJECTS "collideobjects(rect_list) -> object\ncollideobjects(obj_list, key=func) -> object\ntest if any object in a list intersects"
26
-
#defineDOC_RECT_RECT_COLLIDEOBJECTSALL "collideobjectsall(rect_list) -> objects\ncollideobjectsall(obj_list, key=func) -> objects\ntest if all objects in a list intersect"
27
-
#defineDOC_RECT_RECT_COLLIDEDICT "collidedict(dict) -> (key, value)\ncollidedict(dict) -> None\ncollidedict(dict, use_values=0) -> (key, value)\ncollidedict(dict, use_values=0) -> None\ntest if one rectangle in a dictionary intersects"
28
-
#defineDOC_RECT_RECT_COLLIDEDICTALL "collidedictall(dict) -> [(key, value), ...]\ncollidedictall(dict, use_values=0) -> [(key, value), ...]\ntest if all rectangles in a dictionary intersect"
#defineDOC_RECT_COPY "copy() -> Rect\ncopy the rectangle"
4
+
#defineDOC_RECT_MOVE "move(x, y) -> Rect\nmoves the rectangle"
5
+
#defineDOC_RECT_MOVEIP "move_ip(x, y) -> None\nmoves the rectangle, in place"
6
+
#defineDOC_RECT_INFLATE "inflate(x, y) -> Rect\ngrow or shrink the rectangle size"
7
+
#defineDOC_RECT_INFLATEIP "inflate_ip(x, y) -> None\ngrow or shrink the rectangle size, in place"
8
+
#defineDOC_RECT_UPDATE "update(left, top, width, height) -> None\nupdate((left, top), (width, height)) -> None\nupdate(object) -> None\nsets the position and size of the rectangle"
9
+
#defineDOC_RECT_CLAMP "clamp(Rect) -> Rect\nmoves the rectangle inside another"
10
+
#defineDOC_RECT_CLAMPIP "clamp_ip(Rect) -> None\nmoves the rectangle inside another, in place"
11
+
#defineDOC_RECT_CLIP "clip(Rect) -> Rect\ncrops a rectangle inside another"
#defineDOC_RECT_CONTAINS "contains(Rect) -> bool\ntest if one rectangle is inside another"
20
+
#defineDOC_RECT_COLLIDEPOINT "collidepoint(x, y) -> bool\ncollidepoint((x,y)) -> bool\ntest if a point is inside a rectangle"
21
+
#defineDOC_RECT_COLLIDERECT "colliderect(Rect) -> bool\ntest if two rectangles overlap"
22
+
#defineDOC_RECT_COLLIDELIST "collidelist(list) -> index\ntest if one rectangle in a list intersects"
23
+
#defineDOC_RECT_COLLIDELISTALL "collidelistall(list) -> indices\ntest if all rectangles in a list intersect"
24
+
#defineDOC_RECT_COLLIDEOBJECTS "collideobjects(rect_list) -> object\ncollideobjects(obj_list, key=func) -> object\ntest if any object in a list intersects"
25
+
#defineDOC_RECT_COLLIDEOBJECTSALL "collideobjectsall(rect_list) -> objects\ncollideobjectsall(obj_list, key=func) -> objects\ntest if all objects in a list intersect"
26
+
#defineDOC_RECT_COLLIDEDICT "collidedict(dict) -> (key, value)\ncollidedict(dict) -> None\ncollidedict(dict, use_values=0) -> (key, value)\ncollidedict(dict, use_values=0) -> None\ntest if one rectangle in a dictionary intersects"
27
+
#defineDOC_RECT_COLLIDEDICTALL "collidedictall(dict) -> [(key, value), ...]\ncollidedictall(dict, use_values=0) -> [(key, value), ...]\ntest if all rectangles in a dictionary intersect"
0 commit comments