1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

apply transformation matrix to RadialGradient radiuses,

not only to circle origin points
fix for #6006
This commit is contained in:
Daan Sprenkels 2015-11-16 00:26:42 +01:00
parent 436b596a13
commit 6ce83d3290
4 changed files with 137 additions and 0 deletions

View file

@ -205,6 +205,11 @@ Shadings.RadialAxial = (function RadialAxialClosure() {
if (matrix) {
p0 = Util.applyTransform(p0, matrix);
p1 = Util.applyTransform(p1, matrix);
if (shadingType === ShadingType.RADIAL) {
var scale = Util.singularValueDecompose2dScale(matrix);
r0 *= scale[0];
r1 *= scale[1];
}
}
return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1];