BhavyeMathur / goopylib-v1

A simple-yet-powerful 2D graphics framework built on top of Tkinter capable of creating good-looking & modern GUIs, games, and simple animations.

Home Page:https://pypi.org/project/goopylib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Rectangle doesn't resize properly when the GraphWin's autoflush is set to True and winUpdate() is being manually called.

BhavyeMathur opened this issue · comments

Even though the GraphWin gives a warning that there might be issues if this is the case, I think it is important we fix this bug. Everything works normally if I am either not manually updating the window and setting autoflush to True or if I am manually updating the window and setting autoflush to False.

However, If I am doing both, the rectangle flashes on the screen and the resizing is very inaccurate and all over the place.

image

This is the code that is being used:

window = GraphWin(title="Resizable Rectangle", width=700, height=700, autoflush=True)

r = Rectangle(Point(350, 350), Point(500, 500)).draw(window)
r.setResizable(top=True, left=True, bottom=True, right=True)

while True:
    window.updateWin()