mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #6292 from Snuffleupagus/issue-6287
Fix various shading pattern regressions (issue 6287)
This commit is contained in:
commit
72ecbec49d
5 changed files with 21 additions and 11 deletions
|
@ -225,7 +225,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||
|
||||
var numComps = context.numComps;
|
||||
this.tmpCompsBuf = new Float32Array(numComps);
|
||||
var csNumComps = context.colorSpace;
|
||||
var csNumComps = context.colorSpace.numComps;
|
||||
this.tmpCsCompsBuf = context.colorFn ? new Float32Array(csNumComps) :
|
||||
this.tmpCompsBuf;
|
||||
}
|
||||
|
@ -345,13 +345,10 @@ Shadings.Mesh = (function MeshClosure() {
|
|||
|
||||
reader.align();
|
||||
}
|
||||
|
||||
var psPacked = new Int32Array(ps);
|
||||
|
||||
mesh.figures.push({
|
||||
type: 'triangles',
|
||||
coords: psPacked,
|
||||
colors: psPacked
|
||||
coords: new Int32Array(ps),
|
||||
colors: new Int32Array(ps),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -366,13 +363,10 @@ Shadings.Mesh = (function MeshClosure() {
|
|||
coords.push(coord);
|
||||
colors.push(color);
|
||||
}
|
||||
|
||||
var psPacked = new Int32Array(ps);
|
||||
|
||||
mesh.figures.push({
|
||||
type: 'lattice',
|
||||
coords: psPacked,
|
||||
colors: psPacked,
|
||||
coords: new Int32Array(ps),
|
||||
colors: new Int32Array(ps),
|
||||
verticesPerRow: verticesPerRow
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue