https://bugs.kde.org/show_bug.cgi?id=352533
Adds vertical flip, horizontal flip, clockwise rotate and counter-clockwise rotate buttons to the free transform docker widget.
dkazakov |
Krita |
https://bugs.kde.org/show_bug.cgi?id=352533
Adds vertical flip, horizontal flip, clockwise rotate and counter-clockwise rotate buttons to the free transform docker widget.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Hi, @pulponite!
Thank you for a nice patch! It basically works, but the is one bug:
When in a 4-point perspective transform mode, the rotation buttons do nor work. In this mode, instead of adding +-M_PI to aZ() value, you should modify flattenedPerspectiveTransform() matrix instead. You can consult with the code in KisTransformUtils::MatricesPack::MatricesPack to see how the logic works.
I'm looking forward to an updated version of the patch! I can push the patch after that! :)
I've actually just disabled the quick flip and rotate in 4 point perspective mode. I tried to apply a rotation to the existing transform matrix, which worked to a degree, but it didn't look great.
I think there's a bigger change required to make rotate and flip make sense 4 point perspective mode - and I'm not sure if it's worth it.
Hi, @pulponite!
I have pushed your patch to Krita master now, so it will be present in the new versions! Now you have only one patch left to be able to request a KDE developer account! :) You can check bug 365595, which is a continuation of your current work :)