Easy Draw is a simple to use Python module that allows you to create simple graphics primitives (rectangles, circles, polygons, etc.) with Python functions.
Yeah. This thing needs to be more abstract. I need to create a generic Shape parent class that the other shapes can inherit from so I can reduce this redundancy.
There is only one large .py file. May I suggest creating a files folder and separating your code into multiple files. You can import them into the main file. This would improve organization. Other than that, I love this program. I am open to being added as a project contributor if you want.
When drawing different pictures, it can be useful and makes more sense to rotate a rectangle from the top-left corner -- the coordinate used to draw it. However, I don't want to change the .rotate() method completely for the Rectangle and make it only rotate from top-left as it makes sense for some animations and other things to rotate from center.
Probably best to add a boolean parameter option that forces it to rotate from top-left instead of center.
Because the rotate method just modifies the boundary box the oval was drawn in, it doesn't really rotate it. I need to find a way to draw the oval differently or manipulate the boundary box that makes the oval rotate.
When saving the canvas, the filename dialog gets in the way of the capture that grabs the canvas image. If you move the dialog off the canvas, it is not a problem. I saw this issue earlier in testing, and fixed it with a delay. The issue now is some systems (like a Coding Rooms or replit instance) don't have the same speed as my laptop and the issue still persists.
I can delay the action more to ensure the dialog gets out of the way before screenshot.
OR
Redesign how I get filename and maybe not use a dialog. Instead, instantiate and destroy a text entry each save.