Raster source for composing pixels from other sources

This commit is contained in:
Tim Schaub
2015-02-05 14:15:45 -07:00
parent 49cc39c4dd
commit acc97a53eb
7 changed files with 415 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
goog.provide('ol.raster.IdentityOp');
goog.provide('ol.raster.Operation');
/**
* A function that takes an array of {@link ol.raster.Pixel} as inputs, performs
* some operation on them, and returns an array of {@link ol.raster.Pixel} as
* outputs.
*
* @typedef {function(Array.<ol.raster.Pixel>): Array.<ol.raster.Pixel>}
* @api
*/
ol.raster.Operation;
/**
* The identity operation for pixels. Returns the supplied input pixels as
* outputs.
* @param {Array.<ol.raster.Pixel>} inputs Input pixels.
* @return {Array.<ol.raster.Pixel>} The input pixels as output.
*/
ol.raster.IdentityOp = function(inputs) {
return inputs;
};

9
src/ol/raster/pixel.js Normal file
View File

@@ -0,0 +1,9 @@
goog.provide('ol.raster.Pixel');
/**
* An array of numbers representing pixel values.
* @typedef {Array.<number>} ol.raster.Pixel
* @api
*/
ol.raster.Pixel;