Skip to content

Commit 0b701e7

Browse files
committed
Fix the indices of arguments for RadialAxial. It is related to mozilla#10646.
1 parent 89d345c commit 0b701e7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/display/svg.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,13 +1118,13 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
11181118
switch (args[0]) {
11191119
case "RadialAxial":
11201120
const shadingId = `shading${shadingCount++}`;
1121-
const colorStops = args[2];
1121+
const colorStops = args[3];
11221122
let gradient;
11231123

11241124
switch (args[1]) {
11251125
case "axial":
1126-
const point0 = args[3];
1127-
const point1 = args[4];
1126+
const point0 = args[4];
1127+
const point1 = args[5];
11281128
gradient = this.svgFactory.createElement("svg:linearGradient");
11291129
gradient.setAttributeNS(null, "id", shadingId);
11301130
gradient.setAttributeNS(null, "gradientUnits", "userSpaceOnUse");
@@ -1134,10 +1134,10 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
11341134
gradient.setAttributeNS(null, "y2", point1[1]);
11351135
break;
11361136
case "radial":
1137-
const focalPoint = args[3];
1138-
const circlePoint = args[4];
1139-
const focalRadius = args[5];
1140-
const circleRadius = args[6];
1137+
const focalPoint = args[4];
1138+
const circlePoint = args[5];
1139+
const focalRadius = args[6];
1140+
const circleRadius = args[7];
11411141
gradient = this.svgFactory.createElement("svg:radialGradient");
11421142
gradient.setAttributeNS(null, "id", shadingId);
11431143
gradient.setAttributeNS(null, "gradientUnits", "userSpaceOnUse");

0 commit comments

Comments
 (0)