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

Method operate

src/common/style/CartoCSS.js:3272–3283  ·  view source on GitHub ↗
(env, op, other)

Source from the content-addressed store, hash-verified

3270 // our result, in the form of an integer triplet,
3271 // we create a new Color node to hold the result.
3272 operate(env, op, other) {
3273 var result = [];
3274
3275 if (!(other instanceof CartoCSS.Tree.Color)) {
3276 other = other.toColor();
3277 }
3278
3279 for (var c = 0; c < 3; c++) {
3280 result[c] = CartoCSS.Tree.operate(op, this.rgb[c], other.rgb[c]);
3281 }
3282 return new CartoCSS.Tree.Color(result);
3283 }
3284
3285 toHSL() {
3286 var r = this.rgb[0] / 255,

Callers 3

operateMethod · 0.45
evMethod · 0.45
operateMethod · 0.45

Calls 1

toColorMethod · 0.45

Tested by

no test coverage detected