You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
canvases are expected to call Tk.update() when finished so that the results are rendered to the screen.
That means that if you resize a window that has 9 canvases in it, then you get---you guessed it---9 calls to Tk.update() for a single change in the window size. Not only does this hammer performance, but it leads to amusing but distracting tearing artifacts as canvases sequentially redraw.
We need to switch to a design that registers canvases with windows. Any issues with a synchronous approach? The idea would be that the window resize() function is the only one registered as a callback, and this function calls each canvas's .resize() and .draw() functions in a loop. At the end, there's a single call to Tk.update().
The text was updated successfully, but these errors were encountered:
Right now our resizing design is the following:
Tk.update()
when finished so that the results are rendered to the screen.That means that if you resize a window that has 9 canvases in it, then you get---you guessed it---9 calls to
Tk.update()
for a single change in the window size. Not only does this hammer performance, but it leads to amusing but distracting tearing artifacts as canvases sequentially redraw.We need to switch to a design that registers canvases with windows. Any issues with a synchronous approach? The idea would be that the window
resize()
function is the only one registered as a callback, and this function calls each canvas's.resize()
and.draw()
functions in a loop. At the end, there's a single call toTk.update()
.The text was updated successfully, but these errors were encountered: