mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Implements shading types 4-7
This commit is contained in:
parent
59526a7cf1
commit
a583c319a1
6 changed files with 3587 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue