Add quick flip buttons to transform docker
ClosedPublic

Authored by pulponite on Jul 10 2016, 12:11 AM.

Details

Summary

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.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
pulponite updated this revision to Diff 5051.Jul 10 2016, 12:11 AM
pulponite retitled this revision from to Add quick flip buttons to transform docker.
pulponite updated this object.
pulponite edited the test plan for this revision. (Show Details)
pulponite added a reviewer: Krita.
pulponite set the repository for this revision to R37 Krita.
dkazakov requested changes to this revision.Jul 11 2016, 11:41 AM
dkazakov added a reviewer: dkazakov.
dkazakov added a subscriber: dkazakov.

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! :)

This revision now requires changes to proceed.Jul 11 2016, 11:41 AM
pulponite updated this revision to Diff 5215.Jul 15 2016, 8:38 PM
pulponite edited edge metadata.

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.

dkazakov accepted this revision.Jul 17 2016, 9:51 AM
dkazakov edited edge metadata.

The patch looks nice now! Should I push it?

This revision is now accepted and ready to land.Jul 17 2016, 9:51 AM

Cheers! I'm happy with it as is now :)

This revision was automatically updated to reflect the committed changes.

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 :)