mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Merge pull request #13361 from brendandahl/patterns-fixes
Fix several issues with radial/axial shadings and tiling patterns.
This commit is contained in:
commit
ba99e54c66
10 changed files with 492 additions and 50 deletions
|
@ -245,18 +245,17 @@ Shadings.RadialAxial = (function RadialAxialClosure() {
|
|||
unreachable(`getPattern type unknown: ${shadingType}`);
|
||||
}
|
||||
|
||||
const matrix = this.matrix;
|
||||
if (matrix) {
|
||||
p0 = Util.applyTransform(p0, matrix);
|
||||
p1 = Util.applyTransform(p1, matrix);
|
||||
if (shadingType === ShadingType.RADIAL) {
|
||||
const scale = Util.singularValueDecompose2dScale(matrix);
|
||||
r0 *= scale[0];
|
||||
r1 *= scale[1];
|
||||
}
|
||||
}
|
||||
|
||||
return ["RadialAxial", type, this.bbox, this.colorStops, p0, p1, r0, r1];
|
||||
return [
|
||||
"RadialAxial",
|
||||
type,
|
||||
this.bbox,
|
||||
this.colorStops,
|
||||
p0,
|
||||
p1,
|
||||
r0,
|
||||
r1,
|
||||
this.matrix,
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue