|
|
|
@ -15,7 +15,8 @@
@@ -15,7 +15,8 @@
|
|
|
|
|
* limitations under the License. |
|
|
|
|
*/ |
|
|
|
|
/* globals ColorSpace, PDFFunction, Util, error, warn, info, isArray, isStream, |
|
|
|
|
assert, isPDFFunction, UnsupportedManager, UNSUPPORTED_FEATURES */ |
|
|
|
|
assert, isPDFFunction, UnsupportedManager, UNSUPPORTED_FEATURES, |
|
|
|
|
MissingDataException */ |
|
|
|
|
|
|
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
@ -49,6 +50,7 @@ var Pattern = (function PatternClosure() {
@@ -49,6 +50,7 @@ var Pattern = (function PatternClosure() {
|
|
|
|
|
var dict = isStream(shading) ? shading.dict : shading; |
|
|
|
|
var type = dict.get('ShadingType'); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
switch (type) { |
|
|
|
|
case PatternType.AXIAL: |
|
|
|
|
case PatternType.RADIAL: |
|
|
|
@ -60,7 +62,14 @@ var Pattern = (function PatternClosure() {
@@ -60,7 +62,14 @@ var Pattern = (function PatternClosure() {
|
|
|
|
|
case PatternType.TENSOR_PATCH_MESH: |
|
|
|
|
return new Shadings.Mesh(shading, matrix, xref, res); |
|
|
|
|
default: |
|
|
|
|
throw new Error('Unknown PatternType: ' + type); |
|
|
|
|
} |
|
|
|
|
} catch (ex) { |
|
|
|
|
if (ex instanceof MissingDataException) { |
|
|
|
|
throw ex; |
|
|
|
|
} |
|
|
|
|
UnsupportedManager.notify(UNSUPPORTED_FEATURES.shadingPattern); |
|
|
|
|
warn(ex); |
|
|
|
|
return new Shadings.Dummy(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|