commit
						9701f8d376
					
				
							
								
								
									
										25
									
								
								pdf.js
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								pdf.js
									
									
									
									
									
								
							| @ -5365,9 +5365,28 @@ var PDFFunction = (function() { | |||||||
|       } |       } | ||||||
|       return array; |       return array; | ||||||
|     }, |     }, | ||||||
|     constructInterpolated: function() { |     constructInterpolated: function(str, dict) { | ||||||
|       TODO('unhandled type of function'); |       var c0 = dict.get('C0') || [0]; | ||||||
|       this.func = function () { return [ 255, 105, 180 ]; } |       var c1 = dict.get('C1') || [1]; | ||||||
|  |       var n = dict.get('N'); | ||||||
|  |        | ||||||
|  |       if (!IsArray(c0) || !IsArray(c1)) | ||||||
|  |         error('Illegal dictionary for interpolated function'); | ||||||
|  | 
 | ||||||
|  |       var length = c0.length; | ||||||
|  |       var diff = []; | ||||||
|  |       for (var i = 0; i < length; ++i) | ||||||
|  |         diff.push(c1[i] - c0[i]); | ||||||
|  | 
 | ||||||
|  |       this.func = function (args) { | ||||||
|  |         var x = args[0]; | ||||||
|  | 
 | ||||||
|  |         var out = []; | ||||||
|  |         for (var j = 0; j < length; ++j) | ||||||
|  |           out.push(c0[j] + (x^n * diff[i])); | ||||||
|  | 
 | ||||||
|  |         return out; | ||||||
|  |       } | ||||||
|     }, |     }, | ||||||
|     constructStiched: function() { |     constructStiched: function() { | ||||||
|       TODO('unhandled type of function'); |       TODO('unhandled type of function'); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user