Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Original center of QRectF which is Translated about a point (x,y)
DonCoder last edited by DonCoder
As shown in the fig , I have a QRect A, where it's center is (cx,cy). I have translated it as follows
A.translate(-p); where p is QPoint p (x,y).
Now i have the the QRect A which already translated, Now with new translated QRect A how can i get the actual values of (cx,cy) ?
Because A.center() will give me (cx1,cy1) not (cx,cy).
DonCoder last edited by
I think I got it...
So center (cx,cy) is (500,500)
consider P(x,y) = P(1000,800)
//I translated it as
So now to get the original center back.
A.center() will give the original center...
I think my understanding is correct.... Please correct me.