代码之家  ›  专栏  ›  技术社区  ›  Feesih0ps

有没有一种快速的方法可以找到正确的坐标参数来获得重叠?

  •  0
  • Feesih0ps  · 技术社区  · 8 年前

    1 回复  |  直到 8 年前
        1
  •  1
  •   SneakyTurtle    8 年前

    您可能想要使用 bbox .

    这是' returns the bounding box for all matching items

    coords = canvas.bbox(item)
    

    coords = canvas.bbox("itemtag")
    

    如果多个项目具有相同的标记,它将使用给定该标记的第一个项目。