我正在尝试制作一个脚本,该脚本将在 python GUI 中的图像上绘制线条。我已经能够在 GUI 上获得图像,但不知道如何绘制附加线。脚本应该能够循环,这样我就可以画更多的线。
到目前为止我所拥有的:
import tkinter as Tk
root = Tk.Tk()
background_image=Tk.PhotoImage(file="map.png")
background_label = Tk.Label(root, image=background_image)
background_label.place(x=0, y=0, relwidth=1, relheight=1)
root.wm_geometry("794x370")
root.title('Map')
root.mainloop()