Does anyone have any suggestions for how re-sizing in drawing programs (and the GDevelop scene editor) works behind the scenes? The user clicks on the shape and then re-size handles appear around it at the corners and mid points. Then select one of the points and move the mouse to drag and resize.
I’ve tried a few things including having one handle pinned to the object, grabbing that and dragging to resize. But it wasn’t great as the cursor moves but the resizing is delayed and therefore the cursor moved away from the handle.
I found that using scale was more responsive than using width/height. My current set up is to put the object into resize mode by double clicking (thank you Silver-Streak extension) and then waiting a fraction of a second. There’s a ‘mousedot’ object (not currently hidden) that follows the mouse. After the waiting period, it compares the mouse position with the mousedot position and adjusts the scale of the object accordingly. The origin point of the shape is in the bottom left corner. There’s other stuff going on too like tinting, rotating, changing z-order and dragging which are all working without the use of tool modes/buttons which I want to avoid.
The resizing works but isn’t standard compared with the way drawing apps work. The shape manipulation isn’t the main part of my project but if you have a way to make it more standard then I’m interested. My previous method with grabbing the handle used the same principle of the wait delay and then comparing positions.
(The crazy small scale in the actions is because I have the shapes big but resized to small on creation to try to avoid jaggy edges on the circle)