diff options
Diffstat (limited to 'src/svg/qsvggenerator.cpp')
-rw-r--r-- | src/svg/qsvggenerator.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index 3f4e545..8b9a9bd 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -228,9 +228,9 @@ public: QTextStream str(&d_func()->defs, QIODevice::Append); str << "<mask id=\"" << maskId << "\" x=\"0\" y=\"0\" width=\"8\" height=\"8\" " << "stroke=\"none\" fill=\"#ffffff\" patternUnits=\"userSpaceOnUse\" >" << endl; - for (QRect r : reg.rects()) { + const auto &rects = reg.rects(); + for (const QRect &r : rects) str << rct.arg(r.x()).arg(r.y()).arg(r.width()).arg(r.height()) << endl; - } str << QStringLiteral("</mask>") << endl << endl; d_func()->savedPatternMasks.append(maskId); } @@ -856,8 +856,9 @@ int QSvgGenerator::metric(QPaintDevice::PaintDeviceMetric metric) const case QPaintDevice::PdmPhysicalDpiY: return d->engine->resolution(); case QPaintDevice::PdmDevicePixelRatio: - case QPaintDevice::PdmDevicePixelRatioScaled: return 1; + case QPaintDevice::PdmDevicePixelRatioScaled: + return 1 * QPaintDevice::devicePixelRatioFScale(); default: qWarning("QSvgGenerator::metric(), unhandled metric %d\n", metric); break; |