mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
parent
1421b2f205
commit
6fab0a0dac
5 changed files with 191 additions and 8 deletions
|
@ -96,6 +96,12 @@ Shadings.RadialAxial = (function RadialAxialClosure() {
|
|||
var cs = dict.get('ColorSpace', 'CS');
|
||||
cs = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||
this.cs = cs;
|
||||
const bbox = dict.getArray('BBox');
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
this.bbox = Util.normalizeRect(bbox);
|
||||
} else {
|
||||
this.bbox = null;
|
||||
}
|
||||
|
||||
var t0 = 0.0, t1 = 1.0;
|
||||
if (dict.has('Domain')) {
|
||||
|
@ -213,7 +219,7 @@ Shadings.RadialAxial = (function RadialAxialClosure() {
|
|||
}
|
||||
}
|
||||
|
||||
return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1];
|
||||
return ['RadialAxial', type, this.bbox, this.colorStops, p0, p1, r0, r1];
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -719,7 +725,12 @@ Shadings.Mesh = (function MeshClosure() {
|
|||
this.matrix = matrix;
|
||||
this.shadingType = dict.get('ShadingType');
|
||||
this.type = 'Pattern';
|
||||
this.bbox = dict.getArray('BBox');
|
||||
const bbox = dict.getArray('BBox');
|
||||
if (Array.isArray(bbox) && bbox.length === 4) {
|
||||
this.bbox = Util.normalizeRect(bbox);
|
||||
} else {
|
||||
this.bbox = null;
|
||||
}
|
||||
var cs = dict.get('ColorSpace', 'CS');
|
||||
cs = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||
this.cs = cs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue