summaryrefslogtreecommitdiffstats
path: root/src/svg
diff options
context:
space:
mode:
authorSuneel BS <suneel.b-s@nokia.com>2009-05-08 10:03:53 +0530
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-06-22 15:26:16 +0200
commit87fc9a9a6fa74973a5812fb495615edb4df10e27 (patch)
tree102ba7be19d5960bdee4535a1ea4b8765ae180a5 /src/svg
parent6e057c7fce3718bcefc8ccae645aa3c377c7c587 (diff)
Fixed path bug in the SVG module.
In path, if 'moveto' is followed by multiple pairs of coordinates, those pairs shall be treated as 'lineto'. Autotest added by Kim. Reviewed-by: Kim
Diffstat (limited to 'src/svg')
-rw-r--r--src/svg/qsvghandler.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 8185fc6c9d..9486512c13 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -1377,6 +1377,11 @@ static bool parsePathDataFast(const QStringRef &dataStr, QPainterPath &path)
y = y0 = arg[1] + offsetY;
path.moveTo(x0, y0);
arg.pop_front(); arg.pop_front();
+
+ // As per 1.2 spec 8.3.2 The "moveto" commands
+ // If a 'moveto' is followed by multiple pairs of coordinates without explicit commands,
+ // the subsequent pairs shall be treated as implicit 'lineto' commands.
+ pathElem = QLatin1Char('l');
}
break;
case 'M': {
@@ -1389,6 +1394,11 @@ static bool parsePathDataFast(const QStringRef &dataStr, QPainterPath &path)
path.moveTo(x0, y0);
arg.pop_front(); arg.pop_front();
+
+ // As per 1.2 spec 8.3.2 The "moveto" commands
+ // If a 'moveto' is followed by multiple pairs of coordinates without explicit commands,
+ // the subsequent pairs shall be treated as implicit 'lineto' commands.
+ pathElem = QLatin1Char('L');
}
break;
case 'z':