Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.13.1
-
None
-
-
19f29802bf7daafacd0fd824c2a1349e80eac536 (qt/qtbase/5.15)
Description
If you set some clipping (pure integer coordinates, something like 0,0,20,20) and you have some fractional scaling like via QT_SCALE_FACTOR="1.2" the clipping will cut way one pixel to many for some bad rounding cases.
See comment
in
https://bugreports.qt.io/browse/QTBUG-66036
One can workaround by just converting the QRect into some QRectF and calling the QRectF overload instead of the QRect one.
But that setClipRect misbehaves in such a way is neither documented nor expected.
Screenshots with illustration of the problem in the linked comment, difference between the shots is just the QRect => QRectF conversion, integral coordinates/widths/heights.
Attachments
Issue Links
- relates to
-
QTBUG-82601 QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough sometimes causes 1 pixel missmatch between painted area and flushed area.
- Closed
- resulted from
-
QTBUG-79295 Scaling QTransform::mapRect(QRect) can differ from mapRect(QRectF).toRect()
- Reported