实现:tkinter 画布上显示图片,按下鼠标左键并且移动,实现截图
代码如下
# -*- encoding=utf-8 -*-
import os
import tkinter as tk
from PIL import Image
from PIL import ImageTk
left_mouse_down_x = 0
left_mouse_down_y = 0
left_mouse_up_x = 0
left_mouse_up_y = 0
sole_rectangle = None
def left_mouse_down(event):
# print('鼠标左键按下')
g