Как быстрее выполнить self.canvas.scale? Когда я меняю размер окна
# init block in class
self.canvas_frame = Frame(main, relief='groove')
self.canvas_frame.pack()
self.canvas_frame.pack_propagate(True)
self.canvas = Canvas(self.canvas_frame, bg='bisque', width = self.canvas_r_width, height=self.canvas_r_height, highlightthickness=1)
self.canvas.pack()
self.canvas.addtag_all("main_canvas_tag")
def on_resize(self, event):
# determine the ratio of old width/height to new width/height
wscale = event.width / self.width
hscale = event.height / self.height
self.width = event.width
self.height = event.height
# more w and h for faster stretching
# resize the canvas
self.canvas.config(width=self.width, height=self.height)
self.canvas.scale("main_canvas_tag", 0, 0, wscale, hscale)
, растягивание холста занимает очень много времени.