pygame rect 矩形



# pygame.Rect(left,top,width,height)

# pygame.Rect.copy() 复制矩形
# pygame.Rect.move() 移动矩形区域,接受一个列表参数
# pygame.Rect.move_ip() 移动矩形(无返回)
# pygame.Rect.inflate() 增大或缩小矩形大小
# pygame.Rect.clamp() 将矩形移到另一个矩形内
# pygame.Rect.union() 返回一个两个矩形合并后的矩形。
# pygame.Rect.fit() 按纵横比调整矩形的大小或移动矩形。
# pygame.Rect.contains() 测试一个矩形是否在另一个矩形内
# pygame.Rect.collidepoint() 测试点是否在矩形内
# pygame.Rect.colliderect() 测试两个矩形是否重叠

# x,y 表示矩形距离 x、y 轴的距离
# top, left, bottom, right #在坐标系内描述矩形的大小
# topleft, bottomleft, topright, bottomright #返回一个描述矩形大小的元组
# midtop, midleft, midbottom, midright #返回一个描述矩形大小的元组
# center, centerx, centery #(centerx,centery)表示矩形中央坐标(x,y)的值
# size, width, height
# w,h #用于描述矩形的width、height