Ok. That's a really cool patch, Silvio! You are awesome! =) But there are a few things to fix.<br><br>1) You didn't compile the tests. There are tests for KisCoordinatesConverter and KisPrescaledProjection. They test public interface of the converter. They all should pass before we can say the patch is safe for the master. To activate the tests you need to set KDE4_BUILD_TESTS=TRUE in cmake.<br>
<br>2) I don't really approve the way you use m_postprocessingTransform. You aggregated all the image transformations inside this structure, that is not really good, because this transform does not represent any real-world coordinate system (c.s.) anymore (in your patch). In the previous version every QTransform represented a conversion between two distinct coordinate systems (out of 6 we have in Krita). And m_postprocessingTransform was only in charge of canvas effects like rotation and mirroring. You can read about them in [0] and see a picture in attachment. Now you are forced to use such a code to change relative position of one c.s. against another one:<br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> m_d->postprocessingTransform *= QTransform::fromTranslate(-center.x(),-center.y());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> m_d->postprocessingTransform *= m_d->rotation.inverted();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> m_d->postprocessingTransform *= mirror;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> m_d->postprocessingTransform *= m_d->rotation;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> m_d->postprocessingTransform *= QTransform::fromTranslate(center.x(),center.y());</span><br>
<br>I would really like you split these transformation into the distinct ones (representing distinct c.s.'s). Or, maybe, you had some good reason to merge them?<br><br>3) In kis_qpainter_canvas.cpp:122 you use .inverted() method instead of using corresponding method directly. I guess, this is a misprint =)<br>
<br>4) There is a bug:<br>- open image<br>- rotate the canvas a bit<br>- try zooming in/out using the mouse wheel -- you'll see the insane dancing of the canvas on a screen ;)<br><br><br clear="all">[0] - <a href="http://old.nabble.com/Re%3A-Canvas-rotation-preliminary-patch-p29430465.html">http://old.nabble.com/Re%3A-Canvas-rotation-preliminary-patch-p29430465.html</a><br>
<br>-- <br>Dmitry Kazakov<br>