void test()
{
QRect selection
(10,
10,
20,
20);
#if QT3
QWMatrix m;
m.scale(128/350, 128/350);
m = m.invert();
#else
m.scale(128/350, 128/350);
m = m.inverted();
#endif
QRect r
= m.
mapRect(selection
);
bool b = true;
}
void test()
{
QRect selection(10, 10, 20, 20);
#if QT3
QWMatrix m;
m.scale(128/350, 128/350);
m = m.invert();
#else
QMatrix m;
m.scale(128/350, 128/350);
m = m.inverted();
#endif
QRect r = m.mapRect(selection);
bool b = true;
}
To copy to clipboard, switch view to plain text mode
Thanks, I did know that and forgot to use it in the example I posted.
Tell me if I'm wrong here:
If an image were 128 x 128 and displayed on the screen as 350 x 350 and a user selects a region from the 350 x 350 say QRect(10, 10, 20, 20) then the above QRect r would be the rectangle corresponding to the original 128 x 128 image. correct?
If this is the case, the Qt3 and Qt4 values for r are very different.
Bookmarks