I've drawn a pixmap by QPainter and i want to rotate it relative to a specific point. How can i change its rotation origin?
I've drawn a pixmap by QPainter and i want to rotate it relative to a specific point. How can i change its rotation origin?
Last edited by high_flyer; 10th March 2012 at 13:17.
You translate it to the rotation point, rotate, and translate back to the original point.
See an example here:
http://qt-project.org/doc/qt-4.8/pai...ormations.html
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks