penpot / penpot

Penpot: The open-source design tool for design and code collaboration
https://penpot.app
Mozilla Public License 2.0
33.1k stars 1.67k forks source link

Recalculate rotation handlers #2165

Open bunomonteiro opened 2 years ago

bunomonteiro commented 2 years ago

Is your feature request related to a problem? Please describe.

Currently I'm having some difficulties to positioning and transforming objects that have been rotated as their handlers are also changed on rotation or transformation, which is perfectly understandable. However, in some situations it is necessary to recalculate or reposition these handlers so that you can enter a precise value for the object position (x and y) or even perform other transformations.

Describe the solution you'd like

Current behavior: image

What I need: image

So, is there currently any way to recalculate the handlers?

myfunnyandy commented 2 years ago

Hi, I am afraid there is still no easy way to do this. To get this result you could intersect the rotated shape with a rectangle that has the desired area and then flatten the resulting shape.

recalculate

This is obviously far from convenient, the flatten operation alone should be enough to recalculate the handlers. I've added the enhancement to our project plan, we will implement this behavior eventually.

bunomonteiro commented 2 years ago

Oh, I'll try that (even though my real case being a much more complex object than a triangle 😄). Thks!

By the way, an enhancement related to this one is the pivot definition. By default, the object's "x:0, y:0" point is considered the pivot, but if we can define the pivot point, it would take transformations, rotations and positioning to another level.

bunomonteiro commented 2 years ago

"To get this result you could intersect the rotated shape with a rectangle that has the desired area and then flatten the resulting shape."

this hack worked for me! 😃