qt5base-lts/tests/auto/other/lancelot/scripts/image_dpr.qps
Eirik Aavitsland bd1fd197ca Fix drawTiledPixmap() and texture-brush painting with high-DPR images
Although QPainter::drawImage()/drawPixmap() would render images scaled
according to their devicePixelRatio(), that would not happen for
drawTiledPixmap() and when using a textured brush. Implemented here,
in combination with the pending "High-dpi drawTiledPixmap (raster
paint engine)" commit.

[ChangeLog][QtGui] Fix drawTiledPixmap() and texture-brush painting with high-DPR images

Task-number: QTBUG-67248
Change-Id: I037e3f897fa708038a0222d3b0c61c7842d87961
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-04-25 13:39:28 +00:00

44 lines
598 B
Plaintext

setRenderHint Antialiasing true
setRenderHint SmoothPixmapTransform true
image_load sign.png img1
pixmap_load sign.png pix1
begin_block drawIt
save
drawImage img1 20 20 -1 -1
drawRect 17.5 17.5 85 85
setBrush img1
setPen NoPen
drawRect 20 120 120 120
brushRotate 45
drawRect 20 260 120 120
setBrush NoBrush
drawTiledPixmap pix1 20 400 120 120
restore
end_block
save
translate 150 0
rotate -5
repeat_block drawIt
restore
image_setDevicePixelRatio img1 2.0
pixmap_setDevicePixelRatio pix1 2.0
translate 400 0
repeat_block drawIt
save
translate 150 0
rotate -5
repeat_block drawIt
restore