Draft: Initial rough draft of python binding to Canvas::setPreferredCenter
This initial draft pull request implements the functionality of allowing to set the canvas pan position (preferred center) through python. As a new krita contributor I'm have several questions about my commit that I don't feel sure about:
- By inspecting the API I found internal name for this functionality is "preferred center". Is this an appropriate name to use for the python API? Why "preferred center", why not "pan center" for example? Or simply offset or pan?
- Is ZoomController the right place for setting and getting the preferred center? I was confused that the zoomLevel() is read through the zoomManager, but set through the zoomController. Why this asymmetry?
- I used a QPointF as a return value to retrieve both the x and the y values of the preferred center. However, I choose to not use QPointF as the input parameter to
setPreferredCenter()
, but use two separate values, x, and y. Does this make sense? E.g. inDocument.sip
the width and height are returned in two functions. Would it make sense to use two different calls for x and y of the preferred center as well? - The functionality of
setPreferredCenter()
andpreferredCenter()
uses the scaled document position that will be placed in the center of the view. This certainly needs an example to illustrate how it works. What is an appropriate place for this kind of documentation. - Are there any open issues that I can refer to? Where are open issues (requests) handled?