MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / reverse

Method reverse

src/common/overlay/levelRenderer/Color.js:677–688  ·  view source on GitHub ↗

* @function LevelRenderer.Tool.Color.prototype.reverse * @description 颜色翻转。[255-r,255-g,255-b,1-a] * @param {string} color - 颜色。 * @returns {string} 翻转颜色

(color)

Source from the content-addressed store, hash-verified

675 * @returns {string} 翻转颜色
676 */
677 reverse(color) {
678 if (!this.isCalculableColor(color)) {
679 return color;
680 }
681 var data = this.getData(this.toRGBA(color));
682 data = this.map(data,
683 function (c) {
684 return 255 - c;
685 }
686 );
687 return this.toColor(data, 'rgb');
688 }
689
690 /**
691 * @function LevelRenderer.Tool.Color.prototype.mix

Callers 15

ColorSpec.jsFile · 0.80
jquery.jsFile · 0.80
rectifyLayersOrderMethod · 0.80
_initSourceListMethod · 0.80
_generateLayersMethod · 0.80
toShadersMethod · 0.80
_getIntersectRangeMethod · 0.80
mapbox-gl.jsFile · 0.80
qrFunction · 0.80
pFunction · 0.80

Calls 5

isCalculableColorMethod · 0.95
getDataMethod · 0.95
toRGBAMethod · 0.95
mapMethod · 0.95
toColorMethod · 0.95

Tested by

no test coverage detected