|
__init__(self,
*args)
Return Rect object. |
|
|
|
|
|
|
|
|
|
__setitem__(self,
key,
val) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
copy(self)
Returns Rect that is a copy of this rect. |
|
|
|
move(self,
*offset)
Return Rect of same dimension at position offset by x,y. |
|
|
|
move_ip(self,
*offset)
Moves this rect to position offset by x,y. |
|
|
|
inflate(self,
*offset)
Return Rect at same position but size offset by x,y. |
|
|
|
inflate_ip(self,
*offset)
Change size of this rect offset by x,y. |
|
|
|
clip(self,
rect)
Return Rect representing this rect clipped by rect. |
|
|
|
intersection(self,
rect)
Return Rect representing this rect clipped by rect. |
|
|
|
contains(self,
rect)
Check if rect is in this rect. |
|
|
|
intersects(self,
rect)
Check if rect intersects this rect. |
|
|
|
union(self,
rect)
Return Rect representing the union of rect and this rect. |
|
|
|
union_ip(self,
rect)
Change this rect to represent the union of rect and this rect. |
|
|
|
unionall(self,
rect_list)
Return Rect representing the union of rect list and this rect. |
|
|
|
unionall_ip(self,
rect_list)
Change this rect to represent the union of rect list and this rect. |
|
|
|
clamp(self,
rect)
Return Rect of same dimension as this rect moved within rect. |
|
|
|
clamp_ip(self,
rect)
Move this rect within rect. |
|
|
|
set(self,
*args)
Set rect x,y,width,height attributes to argument.
Alternative arguments:
* x,y,w,h
* (x,y),(w,h)
* (x,y,w,h)
* Rect
* Obj with rect attribute |
|
|
|
collidepoint(self,
*point)
Return True if point is in this rect. |
|
|
|
colliderect(self,
rect)
Return True if rect collides with this rect. |
|
|
|
collidelist(self,
rects)
Return index of rect in list that collide with this rect, otherwise returns -1. |
|
|
|
collidelistall(self,
rects)
Return list of indices of rects list that collide with this rect. |
|
|
|
collidedict(self,
rects)
Return (key,value) of first rect from rects dict that collide with this rect, otherwise returns None. |
|
|
|
collidedictall(self,
rects)
Return list of (key,value) from rects dict that collide with this rect. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|