Image adjustment after cropping
dimula73 at gmail.com
Thu Jan 31 08:21:44 UTC 2013
This approach works somewhat ok, but it is needed to investigate how to
calculate widgetSizeRect.center() value. If we do it in a straightforward
way, like QPointF(widgetSize.height()/2, widgetSize.height()/2), then it
works like that:
1) When the image is heavily zoomed in, that is "documentOrigin" == 0, the
cropped area is put somewhere near to the center (not exactly, though).
2) When the image is zoomed out, origin != 0, then the image jumps to the
topleft corner o fthe widget.
I think we just need to recall how the value of the preferred center is
calculated (i would use that unittest) and calculate that properly here.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kimageshop