有没有快速找到get_overlapping的正确坐标参数的方法?
Is there a quick way to find the correct coordinate parameters for get_overlapping?
计算图像的尺寸然后将其减半并添加它是非常乏味的,每次我想检查是否有重叠。
您可能想使用 bbox
。
这个'returns the bounding box for all matching items',即你要获取坐标的图片的矩形轮廓。
coords = canvas.bbox(item)
或
coords = canvas.bbox("itemtag")
如果多个项目具有相同的标签,它将使用给定该标签的第一个项目。
计算图像的尺寸然后将其减半并添加它是非常乏味的,每次我想检查是否有重叠。
您可能想使用 bbox
。
这个'returns the bounding box for all matching items',即你要获取坐标的图片的矩形轮廓。
coords = canvas.bbox(item)
或
coords = canvas.bbox("itemtag")
如果多个项目具有相同的标签,它将使用给定该标签的第一个项目。