First of all, your example does not work since you aren’t calling main()
Second of all, move is not translate, it moves to the absolute position. So you need to subtract/add to the current position to translate.
Edit: Also another thing important to note after a rotation. When you rotate something that is slim to say diagonally, its bounding box will increase. So the position of that object may change depending how big the bounding box becomes.
Lastly, if you plan to do transformations like that, it may make more sense to load up the layer as pixdata or full sized thumbnail in a QImage and do a QTransform on the QImage, then output the results. This would save a lot of redrawing on the canvas and maybe some race conditions as well.
Hm. I thought main is being called automatically in scripter - at least what is done in my case.
That is weird. Because again by running experiments it looks like relative translate to me
Even if the position would be absolute. Then for horizontal object (I highlight it with transform) the position should be somewhere around top left corner but instead it is roughly on (-250, 200) which is way farther than 30 pixels.
Hm. I see. So it is better to work with actual pixels manually instead of using API. Got it. Thanks
I will give it a shot.
multiple times, it only moves the 1st time, but not after. So it shouldn’t be confused with a translate which adds/subtracts based on current position.
It still confusing… I guess having this method called setPostion would make more sense. move method has a lot of interpretations - and its behavior is way to unpredictable.
Thanks for looking at it @KnowZero , I will go with transformation on pixel data directly. At least there should be some consistency