qt5base-lts/tests/auto/gui/painting/qpainter
Eirik Aavitsland 423b650938 Fix painting clipping glitches with fractional scaling
In QPainter, clipping can only be done on whole pixels. The various
ways of specifying a clipping rectangle to the QPainter API have been
inconsistent in how fractional rectangles (either specified directly,
or as a result of fractional scaling) are mapped (rounded) to integer
coordinates.

Also, the mappings have not made sure to keep the edge-to-edge
property of clip rects under scaling. This is particularly important
when scaling QRegions with multiple rects, as QRegion is designed on
the assumption that an area can be described as a set of edge-to-edge
rects.

The fix rounds a clip rect identically with a fill rect. (Indeed, a
followup plan would be to merge QRasterPaintEngine's
toNormalizedFillRect() with the rectangle rounding function in this
commit).

Notably, a QRectF clip is now interpreted the same as a QPainterPath
clip describing the same area.

This modifies d9cc149995

Task-number: QTBUG-100329
Fixes: QTBUG-95957
Task-number: QTBUG-100343
Pick-to: 6.3
Change-Id: Iaae6464b9b17f8bf3adc69007f6ef8d623bf2c80
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-02 13:58:10 +00:00
..
drawEllipse Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
drawLine_rop_bitmap Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
drawPixmap_rop Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
drawPixmap_rop_bitmap Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
utils/createImages Remove the qmake project files 2021-01-07 15:32:28 +01:00
.gitignore Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
CMakeLists.txt Cleanup tests that add test data to resources explicitly 2022-02-11 21:54:44 +01:00
task217400.png Moved gui autotests into new directory structure 2011-09-01 10:59:49 +02:00
tst_qpainter.cpp Fix painting clipping glitches with fractional scaling 2022-03-02 13:58:10 +00:00