diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2020-01-09 11:03:44 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2020-01-16 12:07:09 +0100 |
commit | 3e2823a147b2dca492fece187facfe39f4d33bed (patch) | |
tree | ce50e028742a13cad4e5487d56e0824cf793c3d3 /tests/auto | |
parent | 9b8eba6731b524a300a72974cd5484f06abc4cf0 (diff) | |
download | qtsvg-3e2823a147b2dca492fece187facfe39f4d33bed.tar.gz |
This was introduced as non-optional behavior for 5.14.0, but caused
many regressions. This patch reverts that, and instead prepares for
introducing it as an opt-in feature in Qt 5.15.
[ChangeLog][QSVGRenderer] In Qt 5.14.0, rendering would keep aspect
ratio implied by the viewbox, independently of the specified target
area. This caused many regressions with existing code, so is reverted
now in 5.14.1. The feature will instead be available as an opt-in in
Qt 5.15.
Task-number: QTBUG-81259
Change-Id: I3efa2db864eb80ee00e8a067e56d9912bab36442
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index 8ad74f2..ca05a3a 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -270,6 +270,8 @@ void tst_QSvgRenderer::testMapViewBoxToTarget() QCOMPARE(picture.boundingRect(), QRect(125, 125, 250, 250)); } +#if 0 + // Requires keep-aspectratio feature { // Viewport and viewBox specified -> scale 500x500 square to 1000x750 while preserving aspect ratio gives 750x750 data = "<svg width=\"1000\" height=\"750\" viewBox=\"-250 -250 500 500\"><g><rect x=\"0\" y=\"0\" width=\"500\" height=\"500\" /></g></svg>"; QPicture picture; @@ -279,6 +281,7 @@ void tst_QSvgRenderer::testMapViewBoxToTarget() painter.end(); QCOMPARE(picture.boundingRect(), QRect(500, 375, 750, 750)); } +#endif } void tst_QSvgRenderer::testRenderElement() |