summaryrefslogtreecommitdiffstats
path: root/src/svg/qsvggenerator.cpp
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-08-19 10:03:45 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-08-20 12:57:23 (GMT)
commita2d224b36be8ea23e64273b0224d1c0aba9ca9ac (patch)
tree38dc158ea50bfd6c301b1f5fb94b9d6db873d53e /src/svg/qsvggenerator.cpp
parentff1c6f64aba3bf93382942544d9576f0c521fe62 (diff)
downloadQt-a2d224b36be8ea23e64273b0224d1c0aba9ca9ac.zip
Qt-a2d224b36be8ea23e64273b0224d1c0aba9ca9ac.tar.gz
Qt-a2d224b36be8ea23e64273b0224d1c0aba9ca9ac.tar.bz2
Changed QSvgPaintEngine::drawImage() to ignore aspect ratio.
When calling drawImage(), you expect the entire target rectangle to be filled, but an SVG user agent preserves the source image's aspect ratio by default. This fix explicitly turns off preservation of aspect ratio. Task-number: 257052 Reviewed-by: Trond
Diffstat (limited to 'src/svg/qsvggenerator.cpp')
-rw-r--r--src/svg/qsvggenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index ace4cb8..ef2dd5a 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -921,7 +921,8 @@ void QSvgPaintEngine::drawImage(const QRectF &r, const QImage &image,
stream() << "x=\""<<r.x()<<"\" "
"y=\""<<r.y()<<"\" "
"width=\""<<r.width()<<"\" "
- "height=\""<<r.height()<<"\" ";
+ "height=\""<<r.height()<<"\" "
+ "preserveAspectRatio=\"none\" ";
QByteArray data;
QBuffer buffer(&data);