2

假设我在 Canvas 中有带有标签'stopped''flying'.

如何检查这些对象是否相互重叠?

4

1 回答 1

2

您可以使用该方法find_overlapping

find_overlapping(x1, y1, x2, y2) => tuple
Returns a tuple of all items that overlap the given rectangle, or that are 
completely enclosed by it.

然后在结果列表中循环查找您的标签。

于 2010-03-18T13:31:52.067 回答