mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Replaces UnsupportedManager with callback.
This commit is contained in:
parent
84a47f8e53
commit
c9cb6a3025
7 changed files with 66 additions and 47 deletions
|
@ -13,8 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
/* globals ColorSpace, PDFFunction, Util, error, warn, info, isArray, isStream,
|
||||
assert, isPDFFunction, UnsupportedManager, UNSUPPORTED_FEATURES,
|
||||
MissingDataException */
|
||||
assert, isPDFFunction, UNSUPPORTED_FEATURES, MissingDataException */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -43,7 +42,7 @@ var Pattern = (function PatternClosure() {
|
|||
};
|
||||
|
||||
Pattern.parseShading = function Pattern_parseShading(shading, matrix, xref,
|
||||
res) {
|
||||
res, handler) {
|
||||
|
||||
var dict = isStream(shading) ? shading.dict : shading;
|
||||
var type = dict.get('ShadingType');
|
||||
|
@ -66,7 +65,8 @@ var Pattern = (function PatternClosure() {
|
|||
if (ex instanceof MissingDataException) {
|
||||
throw ex;
|
||||
}
|
||||
UnsupportedManager.notify(UNSUPPORTED_FEATURES.shadingPattern);
|
||||
handler.send('UnsupportedFeature',
|
||||
{featureId: UNSUPPORTED_FEATURES.shadingPattern});
|
||||
warn(ex);
|
||||
return new Shadings.Dummy();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue