I'm trying to paint a rotated image on an existing painter. The rotation as well as the location will be different each time. The rotation works fine, but I can't seem to predict the location. The weird thing is is that it works differently if I draw a text instead of an image.
The text seems to draw with the LEFT BOTTOM starting at 'point' while the image starts with the LEFT TOP at 'point'. But then after the rotation I don't understand what happens with the image....
Example:
QPoint point = QPoint( 80, 200 );
painter->rotate(45);
painter->drawImage(point, QImage("/srv/....")); // i can't predict where this goes
painter->drawText(point, "Rotated text"); // but I can predict exactly where this goes!
I'm thinking that maybe I need to use translate(x,y) in case I'm using drawImage, but I'm at a loss to what kind of x and y I need to use depending on the rotation and why it works fine with drawText.