Hi!<br><br>The reason why Krita doesn't use documentOrigin() is that it supports canvas rotation and canvas mirroring, and all the calculations are done indirectly using QTransform objects. More than that, Krita works mostly in vastScrolling mode (by default), so the origin capabilities were hardly used.<br>
<br>About the rullers problem. Well, due to the fact that the canvas can be rotated and mirrored, the real image coordinates cannot be calculated easily in Krita, so it uses KisCoordinatesConverter now. Of course, the question is open what kind of coordinates we should show in the rullers. Actually, I'm not sure about which scale is currently used by the rullers, but they seem to track the mouse pointer right.<br>
<br>About the future of documentOrigin(). Well, speaking truly, we still need a kind of "origin" functionality in Krita, and I wrote about it in the last commit for the zoom-paning branch. We still have small problems with centering while zooming in Krita in non-vastScrolling modes (which is not default), but documentOring() in the state which it has now will not work, because the KoCanvasControllerWidget does not take origin into account when recalculating "preferred center" and "offset" [1]. The solution for this might be to completely encapsulate origin() inside the KoCanvasControllerWidget and to emit only corrected values of the offset to the clients, but this would involve really drastic changes to this class and its public interface. <br>
<br>[1] - see KoCanvasControllerWidget::updateCanvasOffsetX/Y, KoCanvasControllerWidget::recenterPreferred() and several others. <br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

If not, what would be the proper way now to fix<br>
KisZoomManager::mousePositionChanged(), where does one get the offset of the<br>
document in the canvas?<br clear="all"></blockquote></div><br>Well, the right way would be to use some of the methods of the KisCoordinatesConverter, like imageRectInWidgetPixels(), but which one depends much on what you want to get.<br>
<br>-- <br>Dmitry Kazakov<br>