Implements shading types 4-7

This commit is contained in:
Yury Delendik 2014-01-27 07:17:14 -06:00
parent 59526a7cf1
commit a583c319a1
6 changed files with 3587 additions and 9 deletions

View file

@ -619,10 +619,12 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
}
var transform = viewport.transform;
this.baseTransform = transform.slice();
this.ctx.save();
this.ctx.transform.apply(this.ctx, transform);
this.baseTransform = this.ctx.mozCurrentTransform.slice();
if (this.textLayer) {
this.textLayer.beginLayout();
}
@ -1498,10 +1500,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
}
var pattern = new TilingPattern(IR, color, this.ctx, this.objs,
this.commonObjs, this.baseTransform);
} else if (IR[0] == 'RadialAxial' || IR[0] == 'Dummy') {
var pattern = getShadingPatternFromIR(IR);
} else {
error('Unkown IR type ' + IR[0]);
var pattern = getShadingPatternFromIR(IR);
}
return pattern;
},
@ -1582,7 +1582,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
this.save();
var pattern = getShadingPatternFromIR(patternIR);
ctx.fillStyle = pattern.getPattern(ctx, this);
ctx.fillStyle = pattern.getPattern(ctx, this, true);
var inv = ctx.mozCurrentTransformInverse;
if (inv) {