Fix how curveTo2 (v operator) is translated to SVG
Based on the PDF spec, with `v` operator, current point should be used as the first control point of the curve. Do not overwrite current point before an SVG curve is built, so it can b actually used as first control point.
This commit is contained in:
parent
517ccb7a39
commit
393aed9978
@ -1231,8 +1231,6 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
|||||||
j += 6;
|
j += 6;
|
||||||
break;
|
break;
|
||||||
case OPS.curveTo2:
|
case OPS.curveTo2:
|
||||||
x = args[j + 2];
|
|
||||||
y = args[j + 3];
|
|
||||||
d.push(
|
d.push(
|
||||||
"C",
|
"C",
|
||||||
pf(x),
|
pf(x),
|
||||||
@ -1242,6 +1240,8 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
|||||||
pf(args[j + 2]),
|
pf(args[j + 2]),
|
||||||
pf(args[j + 3])
|
pf(args[j + 3])
|
||||||
);
|
);
|
||||||
|
x = args[j + 2];
|
||||||
|
y = args[j + 3];
|
||||||
j += 4;
|
j += 4;
|
||||||
break;
|
break;
|
||||||
case OPS.curveTo3:
|
case OPS.curveTo3:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user