Work around undetected types in {function(argType):returnType} types

This commit is contained in:
Andreas Hocevar
2016-06-04 00:28:30 +02:00
parent 0dca194525
commit aa9dbb984a
3 changed files with 17 additions and 23 deletions

View File

@@ -611,29 +611,23 @@ ol.proj.ProjectionLike;
/**
* A function that takes an array of input data, performs some operation, and
* returns an array of ouput data. For `'pixel'` type operations, functions
* will be called with an array of {@link ol.raster.Pixel} data and should
* return an array of the same. For `'image'` type operations, functions will
* be called with an array of {@link ImageData
* https://developer.mozilla.org/en-US/docs/Web/API/ImageData} and should return
* an array of the same. The operations are called with a second "data"
* argument, which can be used for storage. The data object is accessible
* from raster events, where it can be initialized in "beforeoperations" and
* accessed again in "afteroperations".
* returns an array of ouput data.
* For `pixel` type operations, the function will be called with an array of
* pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the
* range of 0 - 255. It should return an array of the same.
* For `'image'` type operations, functions will be called with an array of
* {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}
* and should return an array of the same. The operations are called with a
* second "data" argument, which can be used for storage. The data object is
* accessible from raster events, where it can be initialized in
* "beforeoperations" and accessed again in "afteroperations".
*
* @typedef {function((Array.<ol.raster.Pixel>|Array.<ImageData>), Object):
* (Array.<ol.raster.Pixel>|Array.<ImageData>)}
* @typedef {function((Array.<Array.<number>>|Array.<ImageData>), Object):
* (Array.<Array.<number>>|Array.<ImageData>)}
*/
ol.raster.Operation;
/**
* An array of numbers representing pixel values.
* @typedef {Array.<number>} ol.raster.Pixel
*/
ol.raster.Pixel;
/**
* @typedef {{x: number, y: number, width: number, height: number}}
*/