Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
// 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');
- }
+ pathElem = QLatin1Char('l');
break;
+ }
case 'M': {
if (count < 2) {
num++;
// 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':
case 'Z': {
x = x0;
count--; // skip dummy
num++;
path.closeSubpath();
- }
break;
+ }
case 'l': {
if (count < 2) {
num++;
num += 2;
count -= 2;
path.lineTo(x, y);
-
- }
break;
+ }
case 'L': {
if (count < 2) {
num++;
num += 2;
count -= 2;
path.lineTo(x, y);
- }
break;
+ }
case 'h': {
x = num[0] + offsetX;
num++;
count--;
path.lineTo(x, y);
- }
break;
+ }
case 'H': {
x = num[0];
num++;
count--;
path.lineTo(x, y);
- }
break;
+ }
case 'v': {
y = num[0] + offsetY;
num++;
count--;
path.lineTo(x, y);
- }
break;
+ }
case 'V': {
y = num[0];
num++;
count--;
path.lineTo(x, y);
- }
break;
+ }
case 'c': {
if (count < 6) {
num += count;
x = ex;
y = ey;
- }
break;
+ }
case 'A': {
if (count < 7) {
num += count;
x = ex;
y = ey;
- }
break;
+ }
default:
return false;
}