summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2017-02-08 16:12:18 (GMT)
committerEirik Aavitsland <eirik.aavitsland@qt.io>2017-02-14 13:56:49 (GMT)
commit8ea914c667e3d021d6618915e694a4d8bed5fe9f (patch)
tree0291b53843c67c59c93fe93bb26b7801d06881ea
parentbfa9500ae5b9acf24d1b6847003c19a4e49d9749 (diff)
downloadqtsvg-8ea914c667e3d021d6618915e694a4d8bed5fe9f.tar.gz
Fix svg generation for non-normalized rectangles
The raster engine accepts and renders non-normalized rectangles. Make the svg paint engine do the same, instead of just ignoring them. Task-number: QTBUG-58145 Change-Id: Ifa82fd580574bc908552efbb1eeace21bde76ed7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/svg/qsvggenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index 5829a1a..6af4370 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -1062,7 +1062,7 @@ void QSvgPaintEngine::drawRects(const QRectF *rects, int rectCount)
Q_D(QSvgPaintEngine);
for (int i=0; i < rectCount; ++i) {
- const QRectF &rect = rects[i];
+ const QRectF &rect = rects[i].normalized();
*d->stream << "<rect";
if (state->pen().isCosmetic())
*d->stream << " vector-effect=\"non-scaling-stroke\"";