Location new_by_base_offset(int base_y, array offset_list) | 使用基准坐标和一组相对基准坐标的偏移列表创建位置 |
Location shift(int x_count = 0, int y_count = 0) | 移动位置生成新的位置 |
array get_base_xy() | 获取基准坐标(以x最小值, y最小值为基准坐标) |
array get_base_offset() | 获取相对于基准坐标(get_base_xy()获得)的偏移列表 |
array get_offset(int base_x, int base_y) | 获取相对于指定基准坐标的偏移列表 |
int count() | 获取坐标数量 |
void add_xy(int x, int y) | 添加坐标 |
bool remove_xy(int x, int y) | 移除一个坐标 |
bool contains_xy(int x0, int y0) | 判断是否包含坐标 |
bool contains_location(Location other) | 判断是否包含目标位置 |
bool is_intersecting(Location other) | 判断是否和目标位置相交 |
bool is_equal(Location other) | 判断是否和目标位置为同一个位置(相等) |
bool is_congruent(Location other) | 判断是否和目标位置大小和外形一致(不强制要求中心点一致) |
void iterate_xy(function func) | 遍历所有坐标 |
bool iterate_xy_until_true(function func) | 遍历所有坐标直到func返回true |
void iterate_intersect_xy(Location other, function func) | 遍历和目标位置相交部分的坐标 |
bool iterate_intersect_xy_until_true(Location other, function func) | 遍历和目标位置相交部分的坐标直到坐标满足条件 |
void iterate_diff_xy(Location other, function func) | 遍历不在目标位置内的所有坐标 |
bool iterate_diff_xy_until_true(Location other, function func) | 遍历不在目标位置内的所有坐标直到坐标满足条件 |