@flock/wirespec 0.14.3 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clikt-clikt.mjs +1164 -1164
- package/colormath-root-colormath.mjs +425 -425
- package/kotlin-kotlin-stdlib.mjs +37 -37
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1767 -1767
- package/kotlinx-io-kotlinx-io-core.mjs +373 -373
- package/markdown.mjs +1874 -1874
- package/mordant-mordant.mjs +1639 -1639
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +1739 -1700
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +318 -318
- package/wirespec-src-converter-avro.mjs +297 -299
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +262 -268
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +263 -749
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +80 -78
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +23 -22
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +16 -16
|
@@ -43,7 +43,7 @@ var log2 = Math.log2;
|
|
|
43
43
|
//endregion
|
|
44
44
|
//region block: pre-declaration
|
|
45
45
|
function toXYZ() {
|
|
46
|
-
return this.
|
|
46
|
+
return this.o2n().p2n();
|
|
47
47
|
}
|
|
48
48
|
initMetadataForInterface(Color, 'Color');
|
|
49
49
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
@@ -62,21 +62,21 @@ initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
|
62
62
|
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
63
63
|
function invoke$default(r, g, b, alpha, $super) {
|
|
64
64
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
65
|
-
return $super === VOID ? this.
|
|
65
|
+
return $super === VOID ? this.z2o(r, g, b, alpha) : $super.z2o.call(this, r, g, b, alpha);
|
|
66
66
|
}
|
|
67
67
|
function invoke(r, g, b, alpha) {
|
|
68
|
-
return this.
|
|
68
|
+
return this.z2o(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
69
69
|
}
|
|
70
70
|
function invoke$default_0(r, g, b, alpha, $super) {
|
|
71
71
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
72
|
-
return $super === VOID ? this.
|
|
72
|
+
return $super === VOID ? this.e2q(r, g, b, alpha) : invoke(r, g, b, alpha);
|
|
73
73
|
}
|
|
74
74
|
function from255(r, g, b, alpha) {
|
|
75
|
-
return this.
|
|
75
|
+
return this.z2o(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
76
76
|
}
|
|
77
77
|
function from255$default(r, g, b, alpha, $super) {
|
|
78
78
|
alpha = alpha === VOID ? 255 : alpha;
|
|
79
|
-
return $super === VOID ? this.
|
|
79
|
+
return $super === VOID ? this.f2q(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
80
80
|
}
|
|
81
81
|
function invoke_0(hex) {
|
|
82
82
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -91,7 +91,7 @@ function invoke_0(hex) {
|
|
|
91
91
|
} else {
|
|
92
92
|
tmp_2 = 255;
|
|
93
93
|
}
|
|
94
|
-
return this.
|
|
94
|
+
return this.f2q(tmp, tmp_0, tmp_1, tmp_2);
|
|
95
95
|
}
|
|
96
96
|
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace');
|
|
97
97
|
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
@@ -115,27 +115,27 @@ initMetadataForClass(xyY, 'xyY');
|
|
|
115
115
|
function Color() {
|
|
116
116
|
}
|
|
117
117
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
118
|
+
this.v2n_1 = name;
|
|
119
|
+
this.w2n_1 = isPolar;
|
|
120
|
+
this.x2n_1 = min;
|
|
121
|
+
this.y2n_1 = max;
|
|
122
122
|
// Inline function 'kotlin.require' call
|
|
123
|
-
if (!(this.
|
|
123
|
+
if (!(this.x2n_1 <= this.y2n_1)) {
|
|
124
124
|
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
125
125
|
var message = 'min must be less than or equal to max';
|
|
126
126
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
function WhitePoint(name, chromaticity) {
|
|
130
|
-
this.
|
|
131
|
-
this.
|
|
130
|
+
this.z2n_1 = name;
|
|
131
|
+
this.a2o_1 = chromaticity;
|
|
132
132
|
}
|
|
133
133
|
protoOf(WhitePoint).toString = function () {
|
|
134
|
-
return this.
|
|
134
|
+
return this.z2n_1;
|
|
135
135
|
};
|
|
136
136
|
protoOf(WhitePoint).hashCode = function () {
|
|
137
|
-
var result = getStringHashCode(this.
|
|
138
|
-
result = imul(result, 31) + this.
|
|
137
|
+
var result = getStringHashCode(this.z2n_1);
|
|
138
|
+
result = imul(result, 31) + this.a2o_1.hashCode() | 0;
|
|
139
139
|
return result;
|
|
140
140
|
};
|
|
141
141
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -144,22 +144,22 @@ protoOf(WhitePoint).equals = function (other) {
|
|
|
144
144
|
if (!(other instanceof WhitePoint))
|
|
145
145
|
return false;
|
|
146
146
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
147
|
-
if (!(this.
|
|
147
|
+
if (!(this.z2n_1 === tmp0_other_with_cast.z2n_1))
|
|
148
148
|
return false;
|
|
149
|
-
if (!this.
|
|
149
|
+
if (!this.a2o_1.equals(tmp0_other_with_cast.a2o_1))
|
|
150
150
|
return false;
|
|
151
151
|
return true;
|
|
152
152
|
};
|
|
153
153
|
function Illuminant() {
|
|
154
154
|
Illuminant_instance = this;
|
|
155
|
-
this.
|
|
156
|
-
this.
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
155
|
+
this.b2o_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
156
|
+
this.c2o_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
157
|
+
this.d2o_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
158
|
+
this.e2o_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
159
|
+
this.f2o_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
160
|
+
this.g2o_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
161
|
+
this.h2o_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
162
|
+
this.i2o_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
163
163
|
}
|
|
164
164
|
var Illuminant_instance;
|
|
165
165
|
function Illuminant_getInstance() {
|
|
@@ -290,22 +290,22 @@ function Matrix__hashCode_impl_s9ntm9($this) {
|
|
|
290
290
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
291
291
|
if (!(other instanceof Matrix))
|
|
292
292
|
return false;
|
|
293
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
293
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.j2o_1 : THROW_CCE();
|
|
294
294
|
if (!equals($this, tmp0_other_with_cast))
|
|
295
295
|
return false;
|
|
296
296
|
return true;
|
|
297
297
|
}
|
|
298
298
|
function Matrix(rowMajor) {
|
|
299
|
-
this.
|
|
299
|
+
this.j2o_1 = rowMajor;
|
|
300
300
|
}
|
|
301
301
|
protoOf(Matrix).toString = function () {
|
|
302
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
302
|
+
return Matrix__toString_impl_l0abk0(this.j2o_1);
|
|
303
303
|
};
|
|
304
304
|
protoOf(Matrix).hashCode = function () {
|
|
305
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
305
|
+
return Matrix__hashCode_impl_s9ntm9(this.j2o_1);
|
|
306
306
|
};
|
|
307
307
|
protoOf(Matrix).equals = function (other) {
|
|
308
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
308
|
+
return Matrix__equals_impl_g5p8p9(this.j2o_1, other);
|
|
309
309
|
};
|
|
310
310
|
function inverse(_this__u8e3s4, inPlace) {
|
|
311
311
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -387,10 +387,10 @@ function dot$f($this_dot, $other, x, y) {
|
|
|
387
387
|
}
|
|
388
388
|
function Companion() {
|
|
389
389
|
Companion_instance = this;
|
|
390
|
-
this.
|
|
390
|
+
this.k2o_1 = componentInfoList([new ColorComponentInfo('code', false, 30.0, 107.0)]);
|
|
391
391
|
}
|
|
392
|
-
protoOf(Companion).
|
|
393
|
-
return this.
|
|
392
|
+
protoOf(Companion).l2o = function () {
|
|
393
|
+
return this.k2o_1;
|
|
394
394
|
};
|
|
395
395
|
var Companion_instance;
|
|
396
396
|
function Companion_getInstance() {
|
|
@@ -400,38 +400,38 @@ function Companion_getInstance() {
|
|
|
400
400
|
}
|
|
401
401
|
function Ansi16(code) {
|
|
402
402
|
Companion_getInstance();
|
|
403
|
-
this.
|
|
403
|
+
this.m2o_1 = code;
|
|
404
404
|
}
|
|
405
|
-
protoOf(Ansi16).
|
|
405
|
+
protoOf(Ansi16).n2n = function () {
|
|
406
406
|
return Companion_getInstance();
|
|
407
407
|
};
|
|
408
|
-
protoOf(Ansi16).
|
|
409
|
-
switch (this.
|
|
408
|
+
protoOf(Ansi16).o2n = function () {
|
|
409
|
+
switch (this.m2o_1) {
|
|
410
410
|
case 30:
|
|
411
411
|
case 40:
|
|
412
|
-
return Companion_getInstance_2().
|
|
412
|
+
return Companion_getInstance_2().n2o(0.0, 0.0, 0.0);
|
|
413
413
|
case 90:
|
|
414
414
|
case 100:
|
|
415
|
-
return Companion_getInstance_2().
|
|
415
|
+
return Companion_getInstance_2().o2o(128, 128, 128);
|
|
416
416
|
case 37:
|
|
417
417
|
case 47:
|
|
418
|
-
return Companion_getInstance_2().
|
|
418
|
+
return Companion_getInstance_2().o2o(192, 192, 192);
|
|
419
419
|
case 97:
|
|
420
420
|
case 107:
|
|
421
|
-
return Companion_getInstance_2().
|
|
421
|
+
return Companion_getInstance_2().n2o(1.0, 1.0, 1.0);
|
|
422
422
|
}
|
|
423
|
-
var color = this.
|
|
424
|
-
var mul = this.
|
|
423
|
+
var color = this.m2o_1 % 10 | 0;
|
|
424
|
+
var mul = this.m2o_1 > 50 ? 1.0 : 0.5;
|
|
425
425
|
var r = (color % 2 | 0) * mul;
|
|
426
426
|
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
427
427
|
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
428
|
-
return Companion_getInstance_2().
|
|
428
|
+
return Companion_getInstance_2().n2o(r, g, b);
|
|
429
429
|
};
|
|
430
430
|
protoOf(Ansi16).toString = function () {
|
|
431
|
-
return 'Ansi16(code=' + this.
|
|
431
|
+
return 'Ansi16(code=' + this.m2o_1 + ')';
|
|
432
432
|
};
|
|
433
433
|
protoOf(Ansi16).hashCode = function () {
|
|
434
|
-
return this.
|
|
434
|
+
return this.m2o_1;
|
|
435
435
|
};
|
|
436
436
|
protoOf(Ansi16).equals = function (other) {
|
|
437
437
|
if (this === other)
|
|
@@ -439,16 +439,16 @@ protoOf(Ansi16).equals = function (other) {
|
|
|
439
439
|
if (!(other instanceof Ansi16))
|
|
440
440
|
return false;
|
|
441
441
|
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
442
|
-
if (!(this.
|
|
442
|
+
if (!(this.m2o_1 === tmp0_other_with_cast.m2o_1))
|
|
443
443
|
return false;
|
|
444
444
|
return true;
|
|
445
445
|
};
|
|
446
446
|
function Companion_0() {
|
|
447
447
|
Companion_instance_0 = this;
|
|
448
|
-
this.
|
|
448
|
+
this.p2o_1 = componentInfoList([new ColorComponentInfo('code', false, 0.0, 255.0)]);
|
|
449
449
|
}
|
|
450
|
-
protoOf(Companion_0).
|
|
451
|
-
return this.
|
|
450
|
+
protoOf(Companion_0).l2o = function () {
|
|
451
|
+
return this.p2o_1;
|
|
452
452
|
};
|
|
453
453
|
var Companion_instance_0;
|
|
454
454
|
function Companion_getInstance_0() {
|
|
@@ -458,19 +458,19 @@ function Companion_getInstance_0() {
|
|
|
458
458
|
}
|
|
459
459
|
function Ansi256(code) {
|
|
460
460
|
Companion_getInstance_0();
|
|
461
|
-
this.
|
|
461
|
+
this.q2o_1 = code;
|
|
462
462
|
}
|
|
463
|
-
protoOf(Ansi256).
|
|
463
|
+
protoOf(Ansi256).n2n = function () {
|
|
464
464
|
return Companion_getInstance_0();
|
|
465
465
|
};
|
|
466
|
-
protoOf(Ansi256).
|
|
467
|
-
if (this.
|
|
468
|
-
return this.
|
|
469
|
-
if (this.
|
|
470
|
-
var c = imul(this.
|
|
471
|
-
return Companion_getInstance_2().
|
|
466
|
+
protoOf(Ansi256).o2n = function () {
|
|
467
|
+
if (this.q2o_1 < 16)
|
|
468
|
+
return this.r2o().o2n();
|
|
469
|
+
if (this.q2o_1 >= 232) {
|
|
470
|
+
var c = imul(this.q2o_1 - 232 | 0, 10) + 8 | 0;
|
|
471
|
+
return Companion_getInstance_2().o2o(c, c, c);
|
|
472
472
|
}
|
|
473
|
-
var c_0 = this.
|
|
473
|
+
var c_0 = this.q2o_1 - 16 | 0;
|
|
474
474
|
var rem = c_0 % 36 | 0;
|
|
475
475
|
// Inline function 'kotlin.math.floor' call
|
|
476
476
|
var x = c_0 / 36.0;
|
|
@@ -479,16 +479,16 @@ protoOf(Ansi256).y2n = function () {
|
|
|
479
479
|
var x_0 = rem / 6.0;
|
|
480
480
|
var g = Math.floor(x_0) / 5.0;
|
|
481
481
|
var b = (rem % 6 | 0) / 5.0;
|
|
482
|
-
return Companion_getInstance_2().
|
|
482
|
+
return Companion_getInstance_2().s2o(r, g, b);
|
|
483
483
|
};
|
|
484
|
-
protoOf(Ansi256).
|
|
485
|
-
return this.
|
|
484
|
+
protoOf(Ansi256).r2o = function () {
|
|
485
|
+
return this.q2o_1 < 8 ? new Ansi16(this.q2o_1 + 30 | 0) : this.q2o_1 < 16 ? new Ansi16((this.q2o_1 - 8 | 0) + 90 | 0) : this.o2n().r2o();
|
|
486
486
|
};
|
|
487
487
|
protoOf(Ansi256).toString = function () {
|
|
488
|
-
return 'Ansi256(code=' + this.
|
|
488
|
+
return 'Ansi256(code=' + this.q2o_1 + ')';
|
|
489
489
|
};
|
|
490
490
|
protoOf(Ansi256).hashCode = function () {
|
|
491
|
-
return this.
|
|
491
|
+
return this.q2o_1;
|
|
492
492
|
};
|
|
493
493
|
protoOf(Ansi256).equals = function (other) {
|
|
494
494
|
if (this === other)
|
|
@@ -496,16 +496,16 @@ protoOf(Ansi256).equals = function (other) {
|
|
|
496
496
|
if (!(other instanceof Ansi256))
|
|
497
497
|
return false;
|
|
498
498
|
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
499
|
-
if (!(this.
|
|
499
|
+
if (!(this.q2o_1 === tmp0_other_with_cast.q2o_1))
|
|
500
500
|
return false;
|
|
501
501
|
return true;
|
|
502
502
|
};
|
|
503
503
|
function Companion_1() {
|
|
504
504
|
Companion_instance_1 = this;
|
|
505
|
-
this.
|
|
505
|
+
this.t2o_1 = polarComponentInfo('HSV', 0.0, 1.0);
|
|
506
506
|
}
|
|
507
|
-
protoOf(Companion_1).
|
|
508
|
-
return this.
|
|
507
|
+
protoOf(Companion_1).l2o = function () {
|
|
508
|
+
return this.t2o_1;
|
|
509
509
|
};
|
|
510
510
|
var Companion_instance_1;
|
|
511
511
|
function Companion_getInstance_1() {
|
|
@@ -524,30 +524,30 @@ function toSRGB$f(h, v, s, n) {
|
|
|
524
524
|
function HSV(h, s, v, alpha) {
|
|
525
525
|
Companion_getInstance_1();
|
|
526
526
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
527
|
-
this.
|
|
528
|
-
this.
|
|
529
|
-
this.
|
|
530
|
-
this.
|
|
527
|
+
this.u2o_1 = h;
|
|
528
|
+
this.v2o_1 = s;
|
|
529
|
+
this.w2o_1 = v;
|
|
530
|
+
this.x2o_1 = alpha;
|
|
531
531
|
}
|
|
532
|
-
protoOf(HSV).
|
|
532
|
+
protoOf(HSV).n2n = function () {
|
|
533
533
|
return Companion_getInstance_1();
|
|
534
534
|
};
|
|
535
|
-
protoOf(HSV).
|
|
536
|
-
if (this.
|
|
537
|
-
return Companion_getInstance_2().
|
|
538
|
-
var v = this.
|
|
539
|
-
var h = normalizeDeg_0(this.
|
|
540
|
-
var s = this.
|
|
541
|
-
return SRGB_getInstance().
|
|
535
|
+
protoOf(HSV).o2n = function () {
|
|
536
|
+
if (this.v2o_1 < 1.0E-7)
|
|
537
|
+
return Companion_getInstance_2().z2o(this.w2o_1, this.w2o_1, this.w2o_1, this.x2o_1);
|
|
538
|
+
var v = this.w2o_1;
|
|
539
|
+
var h = normalizeDeg_0(this.u2o_1) / 60.0;
|
|
540
|
+
var s = this.v2o_1;
|
|
541
|
+
return SRGB_getInstance().z2o(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.x2o_1);
|
|
542
542
|
};
|
|
543
543
|
protoOf(HSV).toString = function () {
|
|
544
|
-
return 'HSV(h=' + this.
|
|
544
|
+
return 'HSV(h=' + this.u2o_1 + ', s=' + this.v2o_1 + ', v=' + this.w2o_1 + ', alpha=' + this.x2o_1 + ')';
|
|
545
545
|
};
|
|
546
546
|
protoOf(HSV).hashCode = function () {
|
|
547
|
-
var result = getNumberHashCode(this.
|
|
548
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
549
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
550
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
547
|
+
var result = getNumberHashCode(this.u2o_1);
|
|
548
|
+
result = imul(result, 31) + getNumberHashCode(this.v2o_1) | 0;
|
|
549
|
+
result = imul(result, 31) + getNumberHashCode(this.w2o_1) | 0;
|
|
550
|
+
result = imul(result, 31) + getNumberHashCode(this.x2o_1) | 0;
|
|
551
551
|
return result;
|
|
552
552
|
};
|
|
553
553
|
protoOf(HSV).equals = function (other) {
|
|
@@ -556,13 +556,13 @@ protoOf(HSV).equals = function (other) {
|
|
|
556
556
|
if (!(other instanceof HSV))
|
|
557
557
|
return false;
|
|
558
558
|
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
559
|
-
if (!equals(this.
|
|
559
|
+
if (!equals(this.u2o_1, tmp0_other_with_cast.u2o_1))
|
|
560
560
|
return false;
|
|
561
|
-
if (!equals(this.
|
|
561
|
+
if (!equals(this.v2o_1, tmp0_other_with_cast.v2o_1))
|
|
562
562
|
return false;
|
|
563
|
-
if (!equals(this.
|
|
563
|
+
if (!equals(this.w2o_1, tmp0_other_with_cast.w2o_1))
|
|
564
564
|
return false;
|
|
565
|
-
if (!equals(this.
|
|
565
|
+
if (!equals(this.x2o_1, tmp0_other_with_cast.x2o_1))
|
|
566
566
|
return false;
|
|
567
567
|
return true;
|
|
568
568
|
};
|
|
@@ -604,46 +604,46 @@ var ICTCP_XYZ_TO_LMS;
|
|
|
604
604
|
var ICTCP_LMS_TO_XYZ;
|
|
605
605
|
function ICtCp() {
|
|
606
606
|
}
|
|
607
|
-
protoOf(ICtCp).
|
|
608
|
-
var fo = RGBColorSpaces_getInstance().
|
|
607
|
+
protoOf(ICtCp).f2p = function () {
|
|
608
|
+
var fo = RGBColorSpaces_getInstance().n2p_1.s2p();
|
|
609
609
|
var tmp0 = get_ICTCP_ICTCP_to_LMS();
|
|
610
|
-
var tmp1 = this.
|
|
611
|
-
var tmp2 = this.
|
|
610
|
+
var tmp1 = this.b2p_1;
|
|
611
|
+
var tmp2 = this.c2p_1;
|
|
612
612
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
613
|
-
var v2 = this.
|
|
613
|
+
var v2 = this.d2p_1;
|
|
614
614
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
615
615
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
616
616
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
617
617
|
var s = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
618
618
|
var tmp0_0 = get_ICTCP_LMS_to_RGB();
|
|
619
|
-
var tmp1_0 = PqNonlinearity_instance.
|
|
620
|
-
var tmp2_0 = PqNonlinearity_instance.
|
|
619
|
+
var tmp1_0 = PqNonlinearity_instance.b2q(tmp4);
|
|
620
|
+
var tmp2_0 = PqNonlinearity_instance.b2q(tmp5);
|
|
621
621
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
622
|
-
var v2_0 = PqNonlinearity_instance.
|
|
622
|
+
var v2_0 = PqNonlinearity_instance.b2q(s);
|
|
623
623
|
var tmp4_0 = Matrix__get_impl_xogbpk(tmp0_0, 0, 0) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 0) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 0) * v2_0;
|
|
624
624
|
var tmp5_0 = Matrix__get_impl_xogbpk(tmp0_0, 0, 1) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 1) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 1) * v2_0;
|
|
625
625
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
626
626
|
var b = Matrix__get_impl_xogbpk(tmp0_0, 0, 2) * tmp1_0 + Matrix__get_impl_xogbpk(tmp0_0, 1, 2) * tmp2_0 + Matrix__get_impl_xogbpk(tmp0_0, 2, 2) * v2_0;
|
|
627
|
-
return RGBColorSpaces_getInstance().
|
|
627
|
+
return RGBColorSpaces_getInstance().n2p_1.z2o(fo.c2q(tmp4_0), fo.c2q(tmp5_0), fo.c2q(b), this.e2p_1);
|
|
628
628
|
};
|
|
629
629
|
function PqNonlinearity() {
|
|
630
|
-
this.
|
|
631
|
-
this.
|
|
632
|
-
this.
|
|
633
|
-
this.
|
|
634
|
-
this.
|
|
635
|
-
this.
|
|
636
|
-
this.
|
|
637
|
-
this.
|
|
638
|
-
}
|
|
639
|
-
protoOf(PqNonlinearity).
|
|
630
|
+
this.t2p_1 = 0.1593017578125;
|
|
631
|
+
this.u2p_1 = 78.84375;
|
|
632
|
+
this.v2p_1 = 0.8359375;
|
|
633
|
+
this.w2p_1 = 18.8515625;
|
|
634
|
+
this.x2p_1 = 18.6875;
|
|
635
|
+
this.y2p_1 = 10000.0;
|
|
636
|
+
this.z2p_1 = 6.277394636015326;
|
|
637
|
+
this.a2q_1 = 0.012683313515655966;
|
|
638
|
+
}
|
|
639
|
+
protoOf(PqNonlinearity).b2q = function (x) {
|
|
640
640
|
var vp = spow(x, 0.012683313515655966);
|
|
641
641
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
642
642
|
var tmp = n / (18.8515625 - 18.6875 * vp);
|
|
643
643
|
var l = spow_0(tmp, 6.277394636015326);
|
|
644
644
|
return 10000.0 * l;
|
|
645
645
|
};
|
|
646
|
-
protoOf(PqNonlinearity).
|
|
646
|
+
protoOf(PqNonlinearity).c2q = function (x) {
|
|
647
647
|
var tmp = x / 10000.0;
|
|
648
648
|
var yp = spow_0(tmp, 0.1593017578125);
|
|
649
649
|
var tmp_0 = 0.8359375 + 18.8515625 * yp;
|
|
@@ -669,19 +669,19 @@ function _init_properties_ICtCp_kt__7vx7or() {
|
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
function GammaTransferFunctions(gamma) {
|
|
672
|
-
this.
|
|
672
|
+
this.d2q_1 = gamma;
|
|
673
673
|
}
|
|
674
|
-
protoOf(GammaTransferFunctions).
|
|
675
|
-
return spow(x, this.
|
|
674
|
+
protoOf(GammaTransferFunctions).b2q = function (x) {
|
|
675
|
+
return spow(x, this.d2q_1);
|
|
676
676
|
};
|
|
677
|
-
protoOf(GammaTransferFunctions).
|
|
678
|
-
return spow(x, 1.0 / this.
|
|
677
|
+
protoOf(GammaTransferFunctions).c2q = function (x) {
|
|
678
|
+
return spow(x, 1.0 / this.d2q_1);
|
|
679
679
|
};
|
|
680
680
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
681
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
681
|
+
return 'GammaTransferFunctions(gamma=' + this.d2q_1 + ')';
|
|
682
682
|
};
|
|
683
683
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
684
|
-
return getNumberHashCode(this.
|
|
684
|
+
return getNumberHashCode(this.d2q_1);
|
|
685
685
|
};
|
|
686
686
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
687
687
|
if (this === other)
|
|
@@ -689,16 +689,16 @@ protoOf(GammaTransferFunctions).equals = function (other) {
|
|
|
689
689
|
if (!(other instanceof GammaTransferFunctions))
|
|
690
690
|
return false;
|
|
691
691
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
692
|
-
if (!equals(this.
|
|
692
|
+
if (!equals(this.d2q_1, tmp0_other_with_cast.d2q_1))
|
|
693
693
|
return false;
|
|
694
694
|
return true;
|
|
695
695
|
};
|
|
696
696
|
function LinearTransferFunctions() {
|
|
697
697
|
}
|
|
698
|
-
protoOf(LinearTransferFunctions).
|
|
698
|
+
protoOf(LinearTransferFunctions).b2q = function (x) {
|
|
699
699
|
return x;
|
|
700
700
|
};
|
|
701
|
-
protoOf(LinearTransferFunctions).
|
|
701
|
+
protoOf(LinearTransferFunctions).c2q = function (x) {
|
|
702
702
|
return x;
|
|
703
703
|
};
|
|
704
704
|
var LinearTransferFunctions_instance;
|
|
@@ -709,43 +709,43 @@ function RGBColorSpace() {
|
|
|
709
709
|
}
|
|
710
710
|
function Companion_2() {
|
|
711
711
|
Companion_instance_2 = this;
|
|
712
|
-
this.
|
|
712
|
+
this.y2o_1 = RGBColorSpaces_getInstance().g2p_1;
|
|
713
713
|
}
|
|
714
|
-
protoOf(Companion_2).
|
|
715
|
-
return this.
|
|
714
|
+
protoOf(Companion_2).l2o = function () {
|
|
715
|
+
return this.y2o_1.l2o();
|
|
716
716
|
};
|
|
717
|
-
protoOf(Companion_2).
|
|
718
|
-
return this.
|
|
717
|
+
protoOf(Companion_2).h2q = function () {
|
|
718
|
+
return this.y2o_1.h2q();
|
|
719
719
|
};
|
|
720
|
-
protoOf(Companion_2).
|
|
721
|
-
return this.
|
|
720
|
+
protoOf(Companion_2).g2q = function () {
|
|
721
|
+
return this.y2o_1.g2q();
|
|
722
722
|
};
|
|
723
723
|
protoOf(Companion_2).s2 = function () {
|
|
724
|
-
return this.
|
|
724
|
+
return this.y2o_1.s2();
|
|
725
725
|
};
|
|
726
|
-
protoOf(Companion_2).
|
|
727
|
-
return this.
|
|
726
|
+
protoOf(Companion_2).s2p = function () {
|
|
727
|
+
return this.y2o_1.s2p();
|
|
728
728
|
};
|
|
729
|
-
protoOf(Companion_2).
|
|
730
|
-
return this.
|
|
729
|
+
protoOf(Companion_2).i2q = function () {
|
|
730
|
+
return this.y2o_1.i2q();
|
|
731
731
|
};
|
|
732
|
-
protoOf(Companion_2).
|
|
733
|
-
return this.
|
|
732
|
+
protoOf(Companion_2).f2q = function (r, g, b, alpha) {
|
|
733
|
+
return this.y2o_1.f2q(r, g, b, alpha);
|
|
734
734
|
};
|
|
735
|
-
protoOf(Companion_2).
|
|
736
|
-
return this.
|
|
735
|
+
protoOf(Companion_2).z2o = function (r, g, b, alpha) {
|
|
736
|
+
return this.y2o_1.z2o(r, g, b, alpha);
|
|
737
737
|
};
|
|
738
|
-
protoOf(Companion_2).
|
|
739
|
-
return this.
|
|
738
|
+
protoOf(Companion_2).e2q = function (r, g, b, alpha) {
|
|
739
|
+
return this.y2o_1.e2q(r, g, b, alpha);
|
|
740
740
|
};
|
|
741
|
-
protoOf(Companion_2).
|
|
742
|
-
return this.
|
|
741
|
+
protoOf(Companion_2).u2j = function (hex) {
|
|
742
|
+
return this.y2o_1.u2j(hex);
|
|
743
743
|
};
|
|
744
744
|
protoOf(Companion_2).equals = function (other) {
|
|
745
|
-
return equals(RGBColorSpaces_getInstance().
|
|
745
|
+
return equals(RGBColorSpaces_getInstance().g2p_1, other);
|
|
746
746
|
};
|
|
747
747
|
protoOf(Companion_2).hashCode = function () {
|
|
748
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
748
|
+
return hashCode(RGBColorSpaces_getInstance().g2p_1);
|
|
749
749
|
};
|
|
750
750
|
var Companion_instance_2;
|
|
751
751
|
function Companion_getInstance_2() {
|
|
@@ -754,47 +754,47 @@ function Companion_getInstance_2() {
|
|
|
754
754
|
return Companion_instance_2;
|
|
755
755
|
}
|
|
756
756
|
function clamp$copy(receiver, p0, p1, p2, p3) {
|
|
757
|
-
return receiver.
|
|
757
|
+
return receiver.j2q(p0, p1, p2, p3);
|
|
758
758
|
}
|
|
759
759
|
function RGB(r, g, b, alpha, space) {
|
|
760
760
|
Companion_getInstance_2();
|
|
761
|
-
this.
|
|
762
|
-
this.
|
|
763
|
-
this.
|
|
764
|
-
this.
|
|
765
|
-
this.
|
|
761
|
+
this.q2n_1 = r;
|
|
762
|
+
this.r2n_1 = g;
|
|
763
|
+
this.s2n_1 = b;
|
|
764
|
+
this.t2n_1 = alpha;
|
|
765
|
+
this.u2n_1 = space;
|
|
766
766
|
}
|
|
767
|
-
protoOf(RGB).
|
|
768
|
-
return this.
|
|
767
|
+
protoOf(RGB).n2n = function () {
|
|
768
|
+
return this.u2n_1;
|
|
769
769
|
};
|
|
770
|
-
protoOf(RGB).
|
|
770
|
+
protoOf(RGB).k2q = function () {
|
|
771
771
|
// Inline function 'kotlin.math.roundToInt' call
|
|
772
|
-
var this_0 = this.
|
|
772
|
+
var this_0 = this.q2n_1 * 255;
|
|
773
773
|
return roundToInt(this_0);
|
|
774
774
|
};
|
|
775
|
-
protoOf(RGB).
|
|
775
|
+
protoOf(RGB).l2q = function () {
|
|
776
776
|
// Inline function 'kotlin.math.roundToInt' call
|
|
777
|
-
var this_0 = this.
|
|
777
|
+
var this_0 = this.r2n_1 * 255;
|
|
778
778
|
return roundToInt(this_0);
|
|
779
779
|
};
|
|
780
|
-
protoOf(RGB).
|
|
780
|
+
protoOf(RGB).m2q = function () {
|
|
781
781
|
// Inline function 'kotlin.math.roundToInt' call
|
|
782
|
-
var this_0 = this.
|
|
782
|
+
var this_0 = this.s2n_1 * 255;
|
|
783
783
|
return roundToInt(this_0);
|
|
784
784
|
};
|
|
785
|
-
protoOf(RGB).
|
|
786
|
-
var f = SRGB_getInstance().
|
|
787
|
-
return equals(this.
|
|
785
|
+
protoOf(RGB).n2q = function (space) {
|
|
786
|
+
var f = SRGB_getInstance().s2p();
|
|
787
|
+
return equals(this.u2n_1, space) ? this : equals(this.u2n_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().h2p_1) ? space.z2o(f.b2q(this.q2n_1), f.b2q(this.r2n_1), f.b2q(this.s2n_1), this.t2n_1) : equals(this.u2n_1, RGBColorSpaces_getInstance().h2p_1) && equals(space, SRGB_getInstance()) ? space.z2o(f.c2q(this.q2n_1), f.c2q(this.r2n_1), f.c2q(this.s2n_1), this.t2n_1) : this.p2n().t2q(space);
|
|
788
788
|
};
|
|
789
|
-
protoOf(RGB).
|
|
789
|
+
protoOf(RGB).u2q = function () {
|
|
790
790
|
var tmp$ret$3;
|
|
791
791
|
$l$block: {
|
|
792
792
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
793
793
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
794
|
-
var $this$toSRGB = this.
|
|
795
|
-
var r = $this$toSRGB.
|
|
796
|
-
var g = $this$toSRGB.
|
|
797
|
-
var b = $this$toSRGB.
|
|
794
|
+
var $this$toSRGB = this.n2q(SRGB_getInstance());
|
|
795
|
+
var r = $this$toSRGB.q2n_1;
|
|
796
|
+
var g = $this$toSRGB.r2n_1;
|
|
797
|
+
var b = $this$toSRGB.s2n_1;
|
|
798
798
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
799
799
|
var min = Math.min(r, g, b);
|
|
800
800
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -816,81 +816,81 @@ protoOf(RGB).e2r = function () {
|
|
|
816
816
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
817
817
|
var h_0 = normalizeDeg(h);
|
|
818
818
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
819
|
-
tmp$ret$3 = new HSV(h_0, s, max, this.
|
|
819
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.t2n_1);
|
|
820
820
|
break $l$block;
|
|
821
821
|
}
|
|
822
822
|
return tmp$ret$3;
|
|
823
823
|
};
|
|
824
|
-
protoOf(RGB).
|
|
825
|
-
var f = this.
|
|
826
|
-
var tmp0 = _Matrix___init__impl__q3kp4w(this.
|
|
827
|
-
var tmp1 = f.
|
|
828
|
-
var tmp2 = f.
|
|
824
|
+
protoOf(RGB).p2n = function () {
|
|
825
|
+
var f = this.u2n_1.s2p();
|
|
826
|
+
var tmp0 = _Matrix___init__impl__q3kp4w(this.u2n_1.g2q());
|
|
827
|
+
var tmp1 = f.b2q(this.q2n_1);
|
|
828
|
+
var tmp2 = f.b2q(this.r2n_1);
|
|
829
829
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
830
|
-
var v2 = f.
|
|
830
|
+
var v2 = f.b2q(this.s2n_1);
|
|
831
831
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
832
832
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
833
833
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
834
834
|
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
835
|
-
return XYZColorSpace_0(this.
|
|
835
|
+
return XYZColorSpace_0(this.u2n_1.i2q()).z2o(tmp4, tmp5, z, this.t2n_1);
|
|
836
836
|
};
|
|
837
|
-
protoOf(RGB).
|
|
837
|
+
protoOf(RGB).r2o = function () {
|
|
838
838
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
839
|
-
var $this$toSRGB = this.
|
|
839
|
+
var $this$toSRGB = this.n2q(SRGB_getInstance());
|
|
840
840
|
// Inline function 'kotlin.math.roundToInt' call
|
|
841
|
-
var this_0 = $this$toSRGB.
|
|
841
|
+
var this_0 = $this$toSRGB.u2q().w2o_1 * 100;
|
|
842
842
|
var value = roundToInt(this_0);
|
|
843
843
|
if (value === 30)
|
|
844
844
|
return new Ansi16(30);
|
|
845
845
|
var v = value / 50 | 0;
|
|
846
846
|
// Inline function 'kotlin.math.roundToInt' call
|
|
847
|
-
var this_1 = $this$toSRGB.
|
|
847
|
+
var this_1 = $this$toSRGB.s2n_1;
|
|
848
848
|
var tmp$ret$1 = roundToInt(this_1);
|
|
849
849
|
var tmp = imul(tmp$ret$1, 4);
|
|
850
850
|
// Inline function 'kotlin.math.roundToInt' call
|
|
851
|
-
var this_2 = $this$toSRGB.
|
|
851
|
+
var this_2 = $this$toSRGB.r2n_1;
|
|
852
852
|
var tmp$ret$2 = roundToInt(this_2);
|
|
853
853
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
854
854
|
// Inline function 'kotlin.math.roundToInt' call
|
|
855
|
-
var this_3 = $this$toSRGB.
|
|
855
|
+
var this_3 = $this$toSRGB.q2n_1;
|
|
856
856
|
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
857
857
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
858
858
|
};
|
|
859
|
-
protoOf(RGB).
|
|
859
|
+
protoOf(RGB).v2q = function () {
|
|
860
860
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
861
|
-
var $this$toSRGB = this.
|
|
862
|
-
var ri = $this$toSRGB.
|
|
863
|
-
var gi = $this$toSRGB.
|
|
864
|
-
var bi = $this$toSRGB.
|
|
861
|
+
var $this$toSRGB = this.n2q(SRGB_getInstance());
|
|
862
|
+
var ri = $this$toSRGB.k2q();
|
|
863
|
+
var gi = $this$toSRGB.l2q();
|
|
864
|
+
var bi = $this$toSRGB.m2q();
|
|
865
865
|
var tmp;
|
|
866
866
|
if (ri === gi && gi === bi) {
|
|
867
867
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
868
868
|
} else {
|
|
869
869
|
// Inline function 'kotlin.math.roundToInt' call
|
|
870
|
-
var this_0 = $this$toSRGB.
|
|
870
|
+
var this_0 = $this$toSRGB.q2n_1 * 5;
|
|
871
871
|
var tmp$ret$0 = roundToInt(this_0);
|
|
872
872
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
873
873
|
// Inline function 'kotlin.math.roundToInt' call
|
|
874
|
-
var this_1 = $this$toSRGB.
|
|
874
|
+
var this_1 = $this$toSRGB.r2n_1 * 5;
|
|
875
875
|
var tmp$ret$1 = roundToInt(this_1);
|
|
876
876
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
877
877
|
// Inline function 'kotlin.math.roundToInt' call
|
|
878
|
-
var this_2 = $this$toSRGB.
|
|
878
|
+
var this_2 = $this$toSRGB.s2n_1 * 5;
|
|
879
879
|
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
880
880
|
}
|
|
881
881
|
var code = tmp;
|
|
882
882
|
return new Ansi256(code);
|
|
883
883
|
};
|
|
884
|
-
protoOf(RGB).
|
|
885
|
-
return this.
|
|
884
|
+
protoOf(RGB).o2n = function () {
|
|
885
|
+
return this.n2q(RGBColorSpaces_getInstance().g2p_1);
|
|
886
886
|
};
|
|
887
|
-
protoOf(RGB).
|
|
888
|
-
var tmp1 = this.
|
|
889
|
-
var tmp2 = this.
|
|
890
|
-
var tmp3 = this.
|
|
887
|
+
protoOf(RGB).w2q = function () {
|
|
888
|
+
var tmp1 = this.q2n_1;
|
|
889
|
+
var tmp2 = this.r2n_1;
|
|
890
|
+
var tmp3 = this.s2n_1;
|
|
891
891
|
// Inline function 'com.github.ajalt.colormath.internal.clamp3' call
|
|
892
|
-
var alpha = this.
|
|
893
|
-
var tmp0_container = this.
|
|
892
|
+
var alpha = this.t2n_1;
|
|
893
|
+
var tmp0_container = this.n2n().l2o();
|
|
894
894
|
// Inline function 'kotlin.collections.component1' call
|
|
895
895
|
var c1 = tmp0_container.k(0);
|
|
896
896
|
// Inline function 'kotlin.collections.component2' call
|
|
@@ -901,16 +901,16 @@ protoOf(RGB).g2r = function () {
|
|
|
901
901
|
var tmp_0;
|
|
902
902
|
var tmp_1;
|
|
903
903
|
var tmp_2;
|
|
904
|
-
var containsLower = c1.
|
|
905
|
-
if (tmp1 <= c1.
|
|
906
|
-
var containsLower_0 = c2.
|
|
907
|
-
tmp_2 = tmp2 <= c2.
|
|
904
|
+
var containsLower = c1.x2n_1;
|
|
905
|
+
if (tmp1 <= c1.y2n_1 ? containsLower <= tmp1 : false) {
|
|
906
|
+
var containsLower_0 = c2.x2n_1;
|
|
907
|
+
tmp_2 = tmp2 <= c2.y2n_1 ? containsLower_0 <= tmp2 : false;
|
|
908
908
|
} else {
|
|
909
909
|
tmp_2 = false;
|
|
910
910
|
}
|
|
911
911
|
if (tmp_2) {
|
|
912
|
-
var containsLower_1 = c3.
|
|
913
|
-
tmp_1 = tmp3 <= c3.
|
|
912
|
+
var containsLower_1 = c3.x2n_1;
|
|
913
|
+
tmp_1 = tmp3 <= c3.y2n_1 ? containsLower_1 <= tmp3 : false;
|
|
914
914
|
} else {
|
|
915
915
|
tmp_1 = false;
|
|
916
916
|
}
|
|
@@ -922,30 +922,30 @@ protoOf(RGB).g2r = function () {
|
|
|
922
922
|
if (tmp_0) {
|
|
923
923
|
tmp = this;
|
|
924
924
|
} else {
|
|
925
|
-
tmp = clamp$copy(this, coerceIn(tmp1, c1.
|
|
925
|
+
tmp = clamp$copy(this, coerceIn(tmp1, c1.x2n_1, c1.y2n_1), coerceIn(tmp2, c2.x2n_1, c2.y2n_1), coerceIn(tmp3, c3.x2n_1, c3.y2n_1), coerceIn(alpha, 0.0, 1.0));
|
|
926
926
|
}
|
|
927
927
|
return tmp;
|
|
928
928
|
};
|
|
929
|
-
protoOf(RGB).
|
|
929
|
+
protoOf(RGB).x2q = function (r, g, b, alpha, space) {
|
|
930
930
|
return new RGB(r, g, b, alpha, space);
|
|
931
931
|
};
|
|
932
|
-
protoOf(RGB).
|
|
933
|
-
r = r === VOID ? this.
|
|
934
|
-
g = g === VOID ? this.
|
|
935
|
-
b = b === VOID ? this.
|
|
936
|
-
alpha = alpha === VOID ? this.
|
|
937
|
-
space = space === VOID ? this.
|
|
938
|
-
return $super === VOID ? this.
|
|
932
|
+
protoOf(RGB).j2q = function (r, g, b, alpha, space, $super) {
|
|
933
|
+
r = r === VOID ? this.q2n_1 : r;
|
|
934
|
+
g = g === VOID ? this.r2n_1 : g;
|
|
935
|
+
b = b === VOID ? this.s2n_1 : b;
|
|
936
|
+
alpha = alpha === VOID ? this.t2n_1 : alpha;
|
|
937
|
+
space = space === VOID ? this.u2n_1 : space;
|
|
938
|
+
return $super === VOID ? this.x2q(r, g, b, alpha, space) : $super.x2q.call(this, r, g, b, alpha, space);
|
|
939
939
|
};
|
|
940
940
|
protoOf(RGB).toString = function () {
|
|
941
|
-
return 'RGB(r=' + this.
|
|
941
|
+
return 'RGB(r=' + this.q2n_1 + ', g=' + this.r2n_1 + ', b=' + this.s2n_1 + ', alpha=' + this.t2n_1 + ', space=' + toString(this.u2n_1) + ')';
|
|
942
942
|
};
|
|
943
943
|
protoOf(RGB).hashCode = function () {
|
|
944
|
-
var result = getNumberHashCode(this.
|
|
945
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
946
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
947
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
948
|
-
result = imul(result, 31) + hashCode(this.
|
|
944
|
+
var result = getNumberHashCode(this.q2n_1);
|
|
945
|
+
result = imul(result, 31) + getNumberHashCode(this.r2n_1) | 0;
|
|
946
|
+
result = imul(result, 31) + getNumberHashCode(this.s2n_1) | 0;
|
|
947
|
+
result = imul(result, 31) + getNumberHashCode(this.t2n_1) | 0;
|
|
948
|
+
result = imul(result, 31) + hashCode(this.u2n_1) | 0;
|
|
949
949
|
return result;
|
|
950
950
|
};
|
|
951
951
|
protoOf(RGB).equals = function (other) {
|
|
@@ -954,15 +954,15 @@ protoOf(RGB).equals = function (other) {
|
|
|
954
954
|
if (!(other instanceof RGB))
|
|
955
955
|
return false;
|
|
956
956
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
957
|
-
if (!equals(this.
|
|
957
|
+
if (!equals(this.q2n_1, tmp0_other_with_cast.q2n_1))
|
|
958
958
|
return false;
|
|
959
|
-
if (!equals(this.
|
|
959
|
+
if (!equals(this.r2n_1, tmp0_other_with_cast.r2n_1))
|
|
960
960
|
return false;
|
|
961
|
-
if (!equals(this.
|
|
961
|
+
if (!equals(this.s2n_1, tmp0_other_with_cast.s2n_1))
|
|
962
962
|
return false;
|
|
963
|
-
if (!equals(this.
|
|
963
|
+
if (!equals(this.t2n_1, tmp0_other_with_cast.t2n_1))
|
|
964
964
|
return false;
|
|
965
|
-
if (!equals(this.
|
|
965
|
+
if (!equals(this.u2n_1, tmp0_other_with_cast.u2n_1))
|
|
966
966
|
return false;
|
|
967
967
|
return true;
|
|
968
968
|
};
|
|
@@ -1049,17 +1049,17 @@ function get_ACES_AP1_B() {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
var ACES_AP1_B;
|
|
1051
1051
|
function RGBColorSpaces$SRGB$lambda($this$$receiver, it) {
|
|
1052
|
-
return it.
|
|
1052
|
+
return it.o2n();
|
|
1053
1053
|
}
|
|
1054
1054
|
function RGBColorSpaces$BT2020$lambda($this$$receiver, color) {
|
|
1055
1055
|
var tmp;
|
|
1056
1056
|
if (color instanceof RGB) {
|
|
1057
|
-
tmp = color.
|
|
1057
|
+
tmp = color.n2q($this$$receiver);
|
|
1058
1058
|
} else {
|
|
1059
1059
|
if (color instanceof ICtCp) {
|
|
1060
|
-
tmp = color.
|
|
1060
|
+
tmp = color.f2p();
|
|
1061
1061
|
} else {
|
|
1062
|
-
tmp = color.
|
|
1062
|
+
tmp = color.p2n().t2q($this$$receiver);
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
return tmp;
|
|
@@ -1067,29 +1067,29 @@ function RGBColorSpaces$BT2020$lambda($this$$receiver, color) {
|
|
|
1067
1067
|
function RGBColorSpaces() {
|
|
1068
1068
|
RGBColorSpaces_instance = this;
|
|
1069
1069
|
var tmp = this;
|
|
1070
|
-
var tmp_0 = Illuminant_getInstance().
|
|
1070
|
+
var tmp_0 = Illuminant_getInstance().g2o_1;
|
|
1071
1071
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1072
1072
|
var tmp_2 = get_SRGB_R();
|
|
1073
1073
|
var tmp_3 = get_SRGB_G();
|
|
1074
1074
|
var tmp_4 = get_SRGB_B();
|
|
1075
|
-
tmp.
|
|
1076
|
-
this.
|
|
1077
|
-
this.
|
|
1078
|
-
this.
|
|
1079
|
-
this.
|
|
1080
|
-
this.
|
|
1081
|
-
this.
|
|
1075
|
+
tmp.g2p_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1076
|
+
this.h2p_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().g2o_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1077
|
+
this.i2p_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1078
|
+
this.j2p_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1079
|
+
this.k2p_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1080
|
+
this.l2p_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1081
|
+
this.m2p_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().g2o_1, new GammaTransferFunctions(2.19921875), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.21, 0.71), xyY_init_$Create$(0.15, 0.06));
|
|
1082
1082
|
var tmp_5 = this;
|
|
1083
|
-
var tmp_6 = Illuminant_getInstance().
|
|
1083
|
+
var tmp_6 = Illuminant_getInstance().g2o_1;
|
|
1084
1084
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1085
1085
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1086
1086
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1087
1087
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1088
|
-
tmp_5.
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
1088
|
+
tmp_5.n2p_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1089
|
+
this.o2p_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().g2o_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1090
|
+
this.p2p_1 = RGBColorSpace_0('DCI P3', new WhitePoint('DCI P3', xyY_init_$Create$(0.314, 0.351)), new GammaTransferFunctions(2.6), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1091
|
+
this.q2p_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().g2o_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1092
|
+
this.r2p_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().e2o_1, ROMMTransferFunctions_instance, xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
1093
1093
|
}
|
|
1094
1094
|
var RGBColorSpaces_instance;
|
|
1095
1095
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1099,43 +1099,43 @@ function RGBColorSpaces_getInstance() {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
function SRGB() {
|
|
1101
1101
|
SRGB_instance = this;
|
|
1102
|
-
this.
|
|
1102
|
+
this.a2p_1 = RGBColorSpaces_getInstance().g2p_1;
|
|
1103
1103
|
}
|
|
1104
|
-
protoOf(SRGB).
|
|
1105
|
-
return this.
|
|
1104
|
+
protoOf(SRGB).l2o = function () {
|
|
1105
|
+
return this.a2p_1.l2o();
|
|
1106
1106
|
};
|
|
1107
|
-
protoOf(SRGB).
|
|
1108
|
-
return this.
|
|
1107
|
+
protoOf(SRGB).h2q = function () {
|
|
1108
|
+
return this.a2p_1.h2q();
|
|
1109
1109
|
};
|
|
1110
|
-
protoOf(SRGB).
|
|
1111
|
-
return this.
|
|
1110
|
+
protoOf(SRGB).g2q = function () {
|
|
1111
|
+
return this.a2p_1.g2q();
|
|
1112
1112
|
};
|
|
1113
1113
|
protoOf(SRGB).s2 = function () {
|
|
1114
|
-
return this.
|
|
1114
|
+
return this.a2p_1.s2();
|
|
1115
1115
|
};
|
|
1116
|
-
protoOf(SRGB).
|
|
1117
|
-
return this.
|
|
1116
|
+
protoOf(SRGB).s2p = function () {
|
|
1117
|
+
return this.a2p_1.s2p();
|
|
1118
1118
|
};
|
|
1119
|
-
protoOf(SRGB).
|
|
1120
|
-
return this.
|
|
1119
|
+
protoOf(SRGB).i2q = function () {
|
|
1120
|
+
return this.a2p_1.i2q();
|
|
1121
1121
|
};
|
|
1122
|
-
protoOf(SRGB).
|
|
1123
|
-
return this.
|
|
1122
|
+
protoOf(SRGB).f2q = function (r, g, b, alpha) {
|
|
1123
|
+
return this.a2p_1.f2q(r, g, b, alpha);
|
|
1124
1124
|
};
|
|
1125
|
-
protoOf(SRGB).
|
|
1126
|
-
return this.
|
|
1125
|
+
protoOf(SRGB).z2o = function (r, g, b, alpha) {
|
|
1126
|
+
return this.a2p_1.z2o(r, g, b, alpha);
|
|
1127
1127
|
};
|
|
1128
|
-
protoOf(SRGB).
|
|
1129
|
-
return this.
|
|
1128
|
+
protoOf(SRGB).e2q = function (r, g, b, alpha) {
|
|
1129
|
+
return this.a2p_1.e2q(r, g, b, alpha);
|
|
1130
1130
|
};
|
|
1131
|
-
protoOf(SRGB).
|
|
1132
|
-
return this.
|
|
1131
|
+
protoOf(SRGB).u2j = function (hex) {
|
|
1132
|
+
return this.a2p_1.u2j(hex);
|
|
1133
1133
|
};
|
|
1134
1134
|
protoOf(SRGB).equals = function (other) {
|
|
1135
|
-
return equals(RGBColorSpaces_getInstance().
|
|
1135
|
+
return equals(RGBColorSpaces_getInstance().g2p_1, other);
|
|
1136
1136
|
};
|
|
1137
1137
|
protoOf(SRGB).hashCode = function () {
|
|
1138
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
1138
|
+
return hashCode(RGBColorSpaces_getInstance().g2p_1);
|
|
1139
1139
|
};
|
|
1140
1140
|
protoOf(SRGB).toString = function () {
|
|
1141
1141
|
return 'sRGB';
|
|
@@ -1147,39 +1147,39 @@ function SRGB_getInstance() {
|
|
|
1147
1147
|
return SRGB_instance;
|
|
1148
1148
|
}
|
|
1149
1149
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
1150
|
-
this.
|
|
1151
|
-
this.
|
|
1152
|
-
this.
|
|
1153
|
-
this.
|
|
1154
|
-
this.
|
|
1155
|
-
this.
|
|
1156
|
-
this.
|
|
1157
|
-
this.
|
|
1158
|
-
this.
|
|
1159
|
-
this.
|
|
1150
|
+
this.y2q_1 = name;
|
|
1151
|
+
this.z2q_1 = whitePoint;
|
|
1152
|
+
this.a2r_1 = transferFunctions;
|
|
1153
|
+
this.b2r_1 = r;
|
|
1154
|
+
this.c2r_1 = g;
|
|
1155
|
+
this.d2r_1 = b;
|
|
1156
|
+
this.e2r_1 = convertImpl;
|
|
1157
|
+
this.f2r_1 = zeroOneComponentInfo('RGB');
|
|
1158
|
+
this.g2r_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.z2q_1, this.b2r_1, this.c2r_1, this.d2r_1));
|
|
1159
|
+
this.h2r_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.g2r_1)));
|
|
1160
1160
|
}
|
|
1161
1161
|
protoOf(RGBColorSpaceImpl).s2 = function () {
|
|
1162
|
-
return this.
|
|
1162
|
+
return this.y2q_1;
|
|
1163
1163
|
};
|
|
1164
|
-
protoOf(RGBColorSpaceImpl).
|
|
1165
|
-
return this.
|
|
1164
|
+
protoOf(RGBColorSpaceImpl).i2q = function () {
|
|
1165
|
+
return this.z2q_1;
|
|
1166
1166
|
};
|
|
1167
|
-
protoOf(RGBColorSpaceImpl).
|
|
1168
|
-
return this.
|
|
1167
|
+
protoOf(RGBColorSpaceImpl).s2p = function () {
|
|
1168
|
+
return this.a2r_1;
|
|
1169
1169
|
};
|
|
1170
|
-
protoOf(RGBColorSpaceImpl).
|
|
1171
|
-
return this.
|
|
1170
|
+
protoOf(RGBColorSpaceImpl).l2o = function () {
|
|
1171
|
+
return this.f2r_1;
|
|
1172
1172
|
};
|
|
1173
|
-
protoOf(RGBColorSpaceImpl).
|
|
1174
|
-
return this.
|
|
1173
|
+
protoOf(RGBColorSpaceImpl).g2q = function () {
|
|
1174
|
+
return this.g2r_1;
|
|
1175
1175
|
};
|
|
1176
|
-
protoOf(RGBColorSpaceImpl).
|
|
1177
|
-
return this.
|
|
1176
|
+
protoOf(RGBColorSpaceImpl).h2q = function () {
|
|
1177
|
+
return this.h2r_1;
|
|
1178
1178
|
};
|
|
1179
1179
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1180
|
-
return this.
|
|
1180
|
+
return this.y2q_1;
|
|
1181
1181
|
};
|
|
1182
|
-
protoOf(RGBColorSpaceImpl).
|
|
1182
|
+
protoOf(RGBColorSpaceImpl).z2o = function (r, g, b, alpha) {
|
|
1183
1183
|
return new RGB(r, g, b, alpha, this);
|
|
1184
1184
|
};
|
|
1185
1185
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1187,42 +1187,42 @@ protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
|
1187
1187
|
return true;
|
|
1188
1188
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
1189
1189
|
return false;
|
|
1190
|
-
if (!(this.
|
|
1190
|
+
if (!(this.y2q_1 === other.s2()))
|
|
1191
1191
|
return false;
|
|
1192
|
-
if (!this.
|
|
1192
|
+
if (!this.z2q_1.equals(other.i2q()))
|
|
1193
1193
|
return false;
|
|
1194
|
-
if (!equals(this.
|
|
1194
|
+
if (!equals(this.a2r_1, other.s2p()))
|
|
1195
1195
|
return false;
|
|
1196
1196
|
if (other instanceof RGBColorSpaceImpl) {
|
|
1197
|
-
if (!this.
|
|
1197
|
+
if (!this.b2r_1.equals(other.b2r_1))
|
|
1198
1198
|
return false;
|
|
1199
|
-
if (!this.
|
|
1199
|
+
if (!this.c2r_1.equals(other.c2r_1))
|
|
1200
1200
|
return false;
|
|
1201
|
-
if (!this.
|
|
1201
|
+
if (!this.d2r_1.equals(other.d2r_1))
|
|
1202
1202
|
return false;
|
|
1203
1203
|
} else {
|
|
1204
|
-
if (!contentEquals(this.
|
|
1204
|
+
if (!contentEquals(this.g2r_1, other.g2q()))
|
|
1205
1205
|
return false;
|
|
1206
|
-
if (!contentEquals(this.
|
|
1206
|
+
if (!contentEquals(this.h2r_1, other.h2q()))
|
|
1207
1207
|
return false;
|
|
1208
1208
|
}
|
|
1209
1209
|
return true;
|
|
1210
1210
|
};
|
|
1211
1211
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1212
|
-
var result = getStringHashCode(this.
|
|
1213
|
-
result = imul(31, result) + this.
|
|
1214
|
-
result = imul(31, result) + hashCode(this.
|
|
1215
|
-
result = imul(31, result) + this.
|
|
1216
|
-
result = imul(31, result) + this.
|
|
1217
|
-
result = imul(31, result) + this.
|
|
1212
|
+
var result = getStringHashCode(this.y2q_1);
|
|
1213
|
+
result = imul(31, result) + this.z2q_1.hashCode() | 0;
|
|
1214
|
+
result = imul(31, result) + hashCode(this.a2r_1) | 0;
|
|
1215
|
+
result = imul(31, result) + this.b2r_1.hashCode() | 0;
|
|
1216
|
+
result = imul(31, result) + this.c2r_1.hashCode() | 0;
|
|
1217
|
+
result = imul(31, result) + this.d2r_1.hashCode() | 0;
|
|
1218
1218
|
return result;
|
|
1219
1219
|
};
|
|
1220
1220
|
function SRGBTransferFunctions() {
|
|
1221
1221
|
}
|
|
1222
|
-
protoOf(SRGBTransferFunctions).
|
|
1222
|
+
protoOf(SRGBTransferFunctions).c2q = function (x) {
|
|
1223
1223
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1224
1224
|
};
|
|
1225
|
-
protoOf(SRGBTransferFunctions).
|
|
1225
|
+
protoOf(SRGBTransferFunctions).b2q = function (x) {
|
|
1226
1226
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1227
1227
|
};
|
|
1228
1228
|
var SRGBTransferFunctions_instance;
|
|
@@ -1235,14 +1235,14 @@ function RGBColorSpace_0(name, whitePoint, transferFunctions, r, g, b) {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
function ACESccTransferFunctions() {
|
|
1237
1237
|
ACESccTransferFunctions_instance = this;
|
|
1238
|
-
this.
|
|
1239
|
-
this.
|
|
1240
|
-
this.
|
|
1238
|
+
this.i2r_1 = 3.0517578125E-5;
|
|
1239
|
+
this.j2r_1 = 1.52587890625E-5;
|
|
1240
|
+
this.k2r_1 = -0.3013698630136986;
|
|
1241
1241
|
var tmp = this;
|
|
1242
1242
|
// Inline function 'kotlin.math.log2' call
|
|
1243
|
-
tmp.
|
|
1243
|
+
tmp.l2r_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1244
1244
|
}
|
|
1245
|
-
protoOf(ACESccTransferFunctions).
|
|
1245
|
+
protoOf(ACESccTransferFunctions).b2q = function (x) {
|
|
1246
1246
|
var tmp;
|
|
1247
1247
|
var tmp_0 = x;
|
|
1248
1248
|
ACESccTransferFunctions_getInstance();
|
|
@@ -1251,7 +1251,7 @@ protoOf(ACESccTransferFunctions).l2q = function (x) {
|
|
|
1251
1251
|
ACESccTransferFunctions_getInstance();
|
|
1252
1252
|
tmp = (tmp_1 - 1.52587890625E-5) * 2.0;
|
|
1253
1253
|
} else {
|
|
1254
|
-
if (x < this.
|
|
1254
|
+
if (x < this.l2r_1) {
|
|
1255
1255
|
// Inline function 'kotlin.math.pow' call
|
|
1256
1256
|
var x_0 = x * 17.52 - 9.72;
|
|
1257
1257
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1261,7 +1261,7 @@ protoOf(ACESccTransferFunctions).l2q = function (x) {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
return tmp;
|
|
1263
1263
|
};
|
|
1264
|
-
protoOf(ACESccTransferFunctions).
|
|
1264
|
+
protoOf(ACESccTransferFunctions).c2q = function (x) {
|
|
1265
1265
|
var tmp;
|
|
1266
1266
|
var tmp_0 = x;
|
|
1267
1267
|
ACESccTransferFunctions_getInstance();
|
|
@@ -1284,20 +1284,20 @@ function ACESccTransferFunctions_getInstance() {
|
|
|
1284
1284
|
}
|
|
1285
1285
|
function ACEScctTransferFunctions() {
|
|
1286
1286
|
ACEScctTransferFunctions_instance = this;
|
|
1287
|
-
this.
|
|
1288
|
-
this.
|
|
1287
|
+
this.m2r_1 = 10.5402377416545;
|
|
1288
|
+
this.n2r_1 = 0.0729055341958355;
|
|
1289
1289
|
var tmp = this;
|
|
1290
1290
|
// Inline function 'kotlin.math.log2' call
|
|
1291
|
-
tmp.
|
|
1291
|
+
tmp.o2r_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1292
1292
|
}
|
|
1293
|
-
protoOf(ACEScctTransferFunctions).
|
|
1293
|
+
protoOf(ACEScctTransferFunctions).b2q = function (x) {
|
|
1294
1294
|
var tmp;
|
|
1295
1295
|
if (x <= 0.155251141552511) {
|
|
1296
1296
|
ACEScctTransferFunctions_getInstance();
|
|
1297
1297
|
var tmp_0 = x - 0.0729055341958355;
|
|
1298
1298
|
ACEScctTransferFunctions_getInstance();
|
|
1299
1299
|
tmp = tmp_0 / 10.5402377416545;
|
|
1300
|
-
} else if (x < this.
|
|
1300
|
+
} else if (x < this.o2r_1) {
|
|
1301
1301
|
// Inline function 'kotlin.math.pow' call
|
|
1302
1302
|
var x_0 = x * 17.52 - 9.72;
|
|
1303
1303
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1306,7 +1306,7 @@ protoOf(ACEScctTransferFunctions).l2q = function (x) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return tmp;
|
|
1308
1308
|
};
|
|
1309
|
-
protoOf(ACEScctTransferFunctions).
|
|
1309
|
+
protoOf(ACEScctTransferFunctions).c2q = function (x) {
|
|
1310
1310
|
var tmp;
|
|
1311
1311
|
if (x < 0.0078125) {
|
|
1312
1312
|
ACEScctTransferFunctions_getInstance();
|
|
@@ -1327,19 +1327,19 @@ function ACEScctTransferFunctions_getInstance() {
|
|
|
1327
1327
|
}
|
|
1328
1328
|
function BT2020TransferFunctions() {
|
|
1329
1329
|
BT2020TransferFunctions_instance = this;
|
|
1330
|
-
this.
|
|
1331
|
-
this.
|
|
1330
|
+
this.p2r_1 = 1.0993;
|
|
1331
|
+
this.q2r_1 = 0.0181;
|
|
1332
1332
|
var tmp = this;
|
|
1333
1333
|
BT2020TransferFunctions_getInstance();
|
|
1334
1334
|
BT2020TransferFunctions_getInstance();
|
|
1335
1335
|
// Inline function 'kotlin.math.pow' call
|
|
1336
1336
|
var tmp_0 = 1.0993 * Math.pow(0.0181, 0.45);
|
|
1337
1337
|
BT2020TransferFunctions_getInstance();
|
|
1338
|
-
tmp.
|
|
1338
|
+
tmp.r2r_1 = tmp_0 - (1.0993 - 1);
|
|
1339
1339
|
}
|
|
1340
|
-
protoOf(BT2020TransferFunctions).
|
|
1340
|
+
protoOf(BT2020TransferFunctions).b2q = function (x) {
|
|
1341
1341
|
var tmp;
|
|
1342
|
-
if (x < this.
|
|
1342
|
+
if (x < this.r2r_1) {
|
|
1343
1343
|
tmp = x / 4.5;
|
|
1344
1344
|
} else {
|
|
1345
1345
|
BT2020TransferFunctions_getInstance();
|
|
@@ -1349,7 +1349,7 @@ protoOf(BT2020TransferFunctions).l2q = function (x) {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
return numberToDouble(tmp);
|
|
1351
1351
|
};
|
|
1352
|
-
protoOf(BT2020TransferFunctions).
|
|
1352
|
+
protoOf(BT2020TransferFunctions).c2q = function (x) {
|
|
1353
1353
|
var tmp;
|
|
1354
1354
|
var tmp_0 = x;
|
|
1355
1355
|
BT2020TransferFunctions_getInstance();
|
|
@@ -1371,12 +1371,12 @@ function BT2020TransferFunctions_getInstance() {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
function BT709TransferFunctions() {
|
|
1373
1373
|
BT709TransferFunctions_instance = this;
|
|
1374
|
-
this.
|
|
1374
|
+
this.s2r_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1375
1375
|
}
|
|
1376
|
-
protoOf(BT709TransferFunctions).
|
|
1377
|
-
return numberToDouble(x < this.
|
|
1376
|
+
protoOf(BT709TransferFunctions).b2q = function (x) {
|
|
1377
|
+
return numberToDouble(x < this.s2r_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
1378
1378
|
};
|
|
1379
|
-
protoOf(BT709TransferFunctions).
|
|
1379
|
+
protoOf(BT709TransferFunctions).c2q = function (x) {
|
|
1380
1380
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1381
1381
|
};
|
|
1382
1382
|
var BT709TransferFunctions_instance;
|
|
@@ -1386,9 +1386,9 @@ function BT709TransferFunctions_getInstance() {
|
|
|
1386
1386
|
return BT709TransferFunctions_instance;
|
|
1387
1387
|
}
|
|
1388
1388
|
function ROMMTransferFunctions() {
|
|
1389
|
-
this.
|
|
1389
|
+
this.t2r_1 = 0.001953;
|
|
1390
1390
|
}
|
|
1391
|
-
protoOf(ROMMTransferFunctions).
|
|
1391
|
+
protoOf(ROMMTransferFunctions).b2q = function (x) {
|
|
1392
1392
|
var tmp;
|
|
1393
1393
|
var tmp_0 = x;
|
|
1394
1394
|
if (tmp_0 < 16 * 0.001953) {
|
|
@@ -1398,7 +1398,7 @@ protoOf(ROMMTransferFunctions).l2q = function (x) {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
return tmp;
|
|
1400
1400
|
};
|
|
1401
|
-
protoOf(ROMMTransferFunctions).
|
|
1401
|
+
protoOf(ROMMTransferFunctions).c2q = function (x) {
|
|
1402
1402
|
var tmp;
|
|
1403
1403
|
var tmp_0 = x;
|
|
1404
1404
|
if (tmp_0 < 0.001953) {
|
|
@@ -1414,13 +1414,13 @@ function ROMMTransferFunctions_getInstance() {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1416
1416
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1417
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1418
|
-
var wp = whitePoint.
|
|
1417
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.u2r_1, g.u2r_1, b.u2r_1, r.v2r_1, g.v2r_1, b.v2r_1, r.x2r(), g.x2r(), b.x2r());
|
|
1418
|
+
var wp = whitePoint.a2o_1;
|
|
1419
1419
|
var tmp0 = inverse(primaries);
|
|
1420
|
-
var tmp1 = wp.
|
|
1421
|
-
var tmp2 = wp.
|
|
1420
|
+
var tmp1 = wp.y2r();
|
|
1421
|
+
var tmp2 = wp.w2r_1;
|
|
1422
1422
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1423
|
-
var v2 = wp.
|
|
1423
|
+
var v2 = wp.z2r();
|
|
1424
1424
|
var tmp4 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
1425
1425
|
var tmp5 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
1426
1426
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
@@ -1431,9 +1431,9 @@ function RGBColorSpace$lambda($this$$receiver, color) {
|
|
|
1431
1431
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1432
1432
|
var tmp;
|
|
1433
1433
|
if (color instanceof RGB) {
|
|
1434
|
-
tmp = color.
|
|
1434
|
+
tmp = color.n2q($this$$receiver);
|
|
1435
1435
|
} else {
|
|
1436
|
-
tmp = color.
|
|
1436
|
+
tmp = color.p2n().t2q($this$$receiver);
|
|
1437
1437
|
}
|
|
1438
1438
|
return tmp;
|
|
1439
1439
|
}
|
|
@@ -1455,22 +1455,22 @@ function _init_properties_RGBColorSpaces_kt__nc9fsz() {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
function Companion_3() {
|
|
1457
1457
|
Companion_instance_3 = this;
|
|
1458
|
-
this.
|
|
1458
|
+
this.a2s_1 = XYZColorSpaces_getInstance().b2s_1;
|
|
1459
1459
|
}
|
|
1460
|
-
protoOf(Companion_3).
|
|
1461
|
-
return this.
|
|
1460
|
+
protoOf(Companion_3).l2o = function () {
|
|
1461
|
+
return this.a2s_1.l2o();
|
|
1462
1462
|
};
|
|
1463
|
-
protoOf(Companion_3).
|
|
1464
|
-
return this.
|
|
1463
|
+
protoOf(Companion_3).i2q = function () {
|
|
1464
|
+
return this.a2s_1.i2q();
|
|
1465
1465
|
};
|
|
1466
|
-
protoOf(Companion_3).
|
|
1467
|
-
return this.
|
|
1466
|
+
protoOf(Companion_3).z2o = function (x, y, z, alpha) {
|
|
1467
|
+
return this.a2s_1.z2o(x, y, z, alpha);
|
|
1468
1468
|
};
|
|
1469
1469
|
protoOf(Companion_3).hashCode = function () {
|
|
1470
|
-
return hashCode(XYZColorSpaces_getInstance().
|
|
1470
|
+
return hashCode(XYZColorSpaces_getInstance().b2s_1);
|
|
1471
1471
|
};
|
|
1472
1472
|
protoOf(Companion_3).equals = function (other) {
|
|
1473
|
-
return equals(XYZColorSpaces_getInstance().
|
|
1473
|
+
return equals(XYZColorSpaces_getInstance().b2s_1, other);
|
|
1474
1474
|
};
|
|
1475
1475
|
var Companion_instance_3;
|
|
1476
1476
|
function Companion_getInstance_3() {
|
|
@@ -1479,71 +1479,71 @@ function Companion_getInstance_3() {
|
|
|
1479
1479
|
return Companion_instance_3;
|
|
1480
1480
|
}
|
|
1481
1481
|
function adaptToM($this, space, m, mi) {
|
|
1482
|
-
if (space.
|
|
1482
|
+
if (space.i2q().equals($this.s2q_1.i2q()))
|
|
1483
1483
|
return $this;
|
|
1484
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1485
|
-
var tmp1 = $this.
|
|
1486
|
-
var tmp2 = $this.
|
|
1484
|
+
var transform = chromaticAdaptationMatrix(space, $this.s2q_1.i2q().a2o_1, m, mi);
|
|
1485
|
+
var tmp1 = $this.o2q_1;
|
|
1486
|
+
var tmp2 = $this.p2q_1;
|
|
1487
1487
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1488
|
-
var v2 = $this.
|
|
1488
|
+
var v2 = $this.q2q_1;
|
|
1489
1489
|
var tmp4 = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
1490
1490
|
var tmp5 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
1491
1491
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1492
1492
|
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp1 + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp2 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
1493
|
-
return space.
|
|
1493
|
+
return space.z2o(tmp4, tmp5, zz, $this.r2q_1);
|
|
1494
1494
|
}
|
|
1495
1495
|
function XYZ(x, y, z, alpha, space) {
|
|
1496
1496
|
Companion_getInstance_3();
|
|
1497
|
-
this.
|
|
1498
|
-
this.
|
|
1499
|
-
this.
|
|
1500
|
-
this.
|
|
1501
|
-
this.
|
|
1497
|
+
this.o2q_1 = x;
|
|
1498
|
+
this.p2q_1 = y;
|
|
1499
|
+
this.q2q_1 = z;
|
|
1500
|
+
this.r2q_1 = alpha;
|
|
1501
|
+
this.s2q_1 = space;
|
|
1502
1502
|
}
|
|
1503
|
-
protoOf(XYZ).
|
|
1504
|
-
return this.
|
|
1503
|
+
protoOf(XYZ).n2n = function () {
|
|
1504
|
+
return this.s2q_1;
|
|
1505
1505
|
};
|
|
1506
|
-
protoOf(XYZ).
|
|
1506
|
+
protoOf(XYZ).d2s = function (space) {
|
|
1507
1507
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1508
1508
|
};
|
|
1509
|
-
protoOf(XYZ).
|
|
1510
|
-
var tmp0_container = this.
|
|
1509
|
+
protoOf(XYZ).t2q = function (space) {
|
|
1510
|
+
var tmp0_container = this.d2s(XYZColorSpace_0(space.i2q()));
|
|
1511
1511
|
var x = tmp0_container.yd();
|
|
1512
1512
|
var y = tmp0_container.zd();
|
|
1513
1513
|
var z = tmp0_container.ji();
|
|
1514
|
-
var f = space.
|
|
1514
|
+
var f = space.s2p();
|
|
1515
1515
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1516
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
1516
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.h2q());
|
|
1517
1517
|
var tmp4 = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
|
|
1518
1518
|
var tmp5 = Matrix__get_impl_xogbpk(this_0, 0, 1) * x + Matrix__get_impl_xogbpk(this_0, 1, 1) * y + Matrix__get_impl_xogbpk(this_0, 2, 1) * z;
|
|
1519
1519
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1520
1520
|
var b = Matrix__get_impl_xogbpk(this_0, 0, 2) * x + Matrix__get_impl_xogbpk(this_0, 1, 2) * y + Matrix__get_impl_xogbpk(this_0, 2, 2) * z;
|
|
1521
|
-
return space.
|
|
1521
|
+
return space.z2o(f.c2q(tmp4), f.c2q(tmp5), f.c2q(b), this.r2q_1);
|
|
1522
1522
|
};
|
|
1523
|
-
protoOf(XYZ).
|
|
1524
|
-
return this.
|
|
1523
|
+
protoOf(XYZ).o2n = function () {
|
|
1524
|
+
return this.t2q(RGBColorSpaces_getInstance().g2p_1);
|
|
1525
1525
|
};
|
|
1526
|
-
protoOf(XYZ).
|
|
1526
|
+
protoOf(XYZ).p2n = function () {
|
|
1527
1527
|
return this;
|
|
1528
1528
|
};
|
|
1529
1529
|
protoOf(XYZ).yd = function () {
|
|
1530
|
-
return this.
|
|
1530
|
+
return this.o2q_1;
|
|
1531
1531
|
};
|
|
1532
1532
|
protoOf(XYZ).zd = function () {
|
|
1533
|
-
return this.
|
|
1533
|
+
return this.p2q_1;
|
|
1534
1534
|
};
|
|
1535
1535
|
protoOf(XYZ).ji = function () {
|
|
1536
|
-
return this.
|
|
1536
|
+
return this.q2q_1;
|
|
1537
1537
|
};
|
|
1538
1538
|
protoOf(XYZ).toString = function () {
|
|
1539
|
-
return 'XYZ(x=' + this.
|
|
1539
|
+
return 'XYZ(x=' + this.o2q_1 + ', y=' + this.p2q_1 + ', z=' + this.q2q_1 + ', alpha=' + this.r2q_1 + ', space=' + toString(this.s2q_1) + ')';
|
|
1540
1540
|
};
|
|
1541
1541
|
protoOf(XYZ).hashCode = function () {
|
|
1542
|
-
var result = getNumberHashCode(this.
|
|
1543
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1544
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1545
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1546
|
-
result = imul(result, 31) + hashCode(this.
|
|
1542
|
+
var result = getNumberHashCode(this.o2q_1);
|
|
1543
|
+
result = imul(result, 31) + getNumberHashCode(this.p2q_1) | 0;
|
|
1544
|
+
result = imul(result, 31) + getNumberHashCode(this.q2q_1) | 0;
|
|
1545
|
+
result = imul(result, 31) + getNumberHashCode(this.r2q_1) | 0;
|
|
1546
|
+
result = imul(result, 31) + hashCode(this.s2q_1) | 0;
|
|
1547
1547
|
return result;
|
|
1548
1548
|
};
|
|
1549
1549
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -1552,27 +1552,27 @@ protoOf(XYZ).equals = function (other) {
|
|
|
1552
1552
|
if (!(other instanceof XYZ))
|
|
1553
1553
|
return false;
|
|
1554
1554
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1555
|
-
if (!equals(this.
|
|
1555
|
+
if (!equals(this.o2q_1, tmp0_other_with_cast.o2q_1))
|
|
1556
1556
|
return false;
|
|
1557
|
-
if (!equals(this.
|
|
1557
|
+
if (!equals(this.p2q_1, tmp0_other_with_cast.p2q_1))
|
|
1558
1558
|
return false;
|
|
1559
|
-
if (!equals(this.
|
|
1559
|
+
if (!equals(this.q2q_1, tmp0_other_with_cast.q2q_1))
|
|
1560
1560
|
return false;
|
|
1561
|
-
if (!equals(this.
|
|
1561
|
+
if (!equals(this.r2q_1, tmp0_other_with_cast.r2q_1))
|
|
1562
1562
|
return false;
|
|
1563
|
-
if (!equals(this.
|
|
1563
|
+
if (!equals(this.s2q_1, tmp0_other_with_cast.s2q_1))
|
|
1564
1564
|
return false;
|
|
1565
1565
|
return true;
|
|
1566
1566
|
};
|
|
1567
1567
|
function XYZColorSpace() {
|
|
1568
1568
|
}
|
|
1569
1569
|
function XYZColorSpace_0(whitePoint) {
|
|
1570
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1570
|
+
return whitePoint.equals(Illuminant_getInstance().g2o_1) ? XYZColorSpaces_getInstance().b2s_1 : whitePoint.equals(Illuminant_getInstance().e2o_1) ? XYZColorSpaces_getInstance().c2s_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1571
1571
|
}
|
|
1572
1572
|
function XYZColorSpaces() {
|
|
1573
1573
|
XYZColorSpaces_instance = this;
|
|
1574
|
-
this.
|
|
1575
|
-
this.
|
|
1574
|
+
this.b2s_1 = new XYZColorSpaceImpl(Illuminant_getInstance().g2o_1);
|
|
1575
|
+
this.c2s_1 = new XYZColorSpaceImpl(Illuminant_getInstance().e2o_1);
|
|
1576
1576
|
}
|
|
1577
1577
|
var XYZColorSpaces_instance;
|
|
1578
1578
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1583,34 +1583,34 @@ function XYZColorSpaces_getInstance() {
|
|
|
1583
1583
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1584
1584
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1585
1585
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1586
|
-
var dstWp = _this__u8e3s4.
|
|
1587
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
1588
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
1586
|
+
var dstWp = _this__u8e3s4.i2q().a2o_1;
|
|
1587
|
+
var src = dot_0(xyzToLms, srcWp.y2r(), srcWp.w2r_1, srcWp.z2r());
|
|
1588
|
+
var dst = dot_0(xyzToLms, dstWp.y2r(), dstWp.w2r_1, dstWp.z2r());
|
|
1589
1589
|
return dot(dotDiagonal(lmsToXyz, _Vector___get_l__impl__envr1l(dst) / _Vector___get_l__impl__envr1l(src), _Vector___get_m__impl__e5qq0m(dst) / _Vector___get_m__impl__e5qq0m(src), _Vector___get_s__impl__pzuljk(dst) / _Vector___get_s__impl__pzuljk(src)), xyzToLms);
|
|
1590
1590
|
}
|
|
1591
1591
|
function XYZColorSpaceImpl(whitePoint) {
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1592
|
+
this.e2s_1 = whitePoint;
|
|
1593
|
+
this.f2s_1 = zeroOneComponentInfo('XYZ');
|
|
1594
1594
|
}
|
|
1595
|
-
protoOf(XYZColorSpaceImpl).
|
|
1596
|
-
return this.
|
|
1595
|
+
protoOf(XYZColorSpaceImpl).i2q = function () {
|
|
1596
|
+
return this.e2s_1;
|
|
1597
1597
|
};
|
|
1598
|
-
protoOf(XYZColorSpaceImpl).
|
|
1599
|
-
return this.
|
|
1598
|
+
protoOf(XYZColorSpaceImpl).l2o = function () {
|
|
1599
|
+
return this.f2s_1;
|
|
1600
1600
|
};
|
|
1601
1601
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1602
|
-
return 'XYZColorSpace(' + this.
|
|
1602
|
+
return 'XYZColorSpace(' + this.e2s_1.toString() + ')';
|
|
1603
1603
|
};
|
|
1604
|
-
protoOf(XYZColorSpaceImpl).
|
|
1604
|
+
protoOf(XYZColorSpaceImpl).z2o = function (x, y, z, alpha) {
|
|
1605
1605
|
return new XYZ(x, y, z, alpha, this);
|
|
1606
1606
|
};
|
|
1607
1607
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1608
|
-
return this.
|
|
1608
|
+
return this.e2s_1.hashCode();
|
|
1609
1609
|
};
|
|
1610
1610
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1611
1611
|
var tmp;
|
|
1612
1612
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
1613
|
-
tmp = this.
|
|
1613
|
+
tmp = this.e2s_1.equals(other.i2q());
|
|
1614
1614
|
} else {
|
|
1615
1615
|
tmp = false;
|
|
1616
1616
|
}
|
|
@@ -1626,26 +1626,26 @@ function xyY_init_$Create$(x, y, Y) {
|
|
|
1626
1626
|
}
|
|
1627
1627
|
function xyY(x, y, Y) {
|
|
1628
1628
|
Y = Y === VOID ? 1.0 : Y;
|
|
1629
|
-
this.
|
|
1630
|
-
this.
|
|
1631
|
-
this.
|
|
1629
|
+
this.u2r_1 = x;
|
|
1630
|
+
this.v2r_1 = y;
|
|
1631
|
+
this.w2r_1 = Y;
|
|
1632
1632
|
}
|
|
1633
|
-
protoOf(xyY).
|
|
1634
|
-
return 1 - this.
|
|
1633
|
+
protoOf(xyY).x2r = function () {
|
|
1634
|
+
return 1 - this.u2r_1 - this.v2r_1;
|
|
1635
1635
|
};
|
|
1636
|
-
protoOf(xyY).
|
|
1637
|
-
return this.
|
|
1636
|
+
protoOf(xyY).y2r = function () {
|
|
1637
|
+
return this.u2r_1 * this.w2r_1 / this.v2r_1;
|
|
1638
1638
|
};
|
|
1639
|
-
protoOf(xyY).
|
|
1640
|
-
return (1 - this.
|
|
1639
|
+
protoOf(xyY).z2r = function () {
|
|
1640
|
+
return (1 - this.u2r_1 - this.v2r_1) * this.w2r_1 / this.v2r_1;
|
|
1641
1641
|
};
|
|
1642
1642
|
protoOf(xyY).toString = function () {
|
|
1643
|
-
return 'xyY(x=' + this.
|
|
1643
|
+
return 'xyY(x=' + this.u2r_1 + ', y=' + this.v2r_1 + ', Y=' + this.w2r_1 + ')';
|
|
1644
1644
|
};
|
|
1645
1645
|
protoOf(xyY).hashCode = function () {
|
|
1646
|
-
var result = getNumberHashCode(this.
|
|
1647
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1648
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1646
|
+
var result = getNumberHashCode(this.u2r_1);
|
|
1647
|
+
result = imul(result, 31) + getNumberHashCode(this.v2r_1) | 0;
|
|
1648
|
+
result = imul(result, 31) + getNumberHashCode(this.w2r_1) | 0;
|
|
1649
1649
|
return result;
|
|
1650
1650
|
};
|
|
1651
1651
|
protoOf(xyY).equals = function (other) {
|
|
@@ -1654,30 +1654,30 @@ protoOf(xyY).equals = function (other) {
|
|
|
1654
1654
|
if (!(other instanceof xyY))
|
|
1655
1655
|
return false;
|
|
1656
1656
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1657
|
-
if (!equals(this.
|
|
1657
|
+
if (!equals(this.u2r_1, tmp0_other_with_cast.u2r_1))
|
|
1658
1658
|
return false;
|
|
1659
|
-
if (!equals(this.
|
|
1659
|
+
if (!equals(this.v2r_1, tmp0_other_with_cast.v2r_1))
|
|
1660
1660
|
return false;
|
|
1661
|
-
if (!equals(this.
|
|
1661
|
+
if (!equals(this.w2r_1, tmp0_other_with_cast.w2r_1))
|
|
1662
1662
|
return false;
|
|
1663
1663
|
return true;
|
|
1664
1664
|
};
|
|
1665
1665
|
//region block: post-declaration
|
|
1666
|
-
protoOf(Ansi16).
|
|
1667
|
-
protoOf(Ansi256).
|
|
1668
|
-
protoOf(HSV).
|
|
1669
|
-
protoOf(Companion_2).
|
|
1670
|
-
protoOf(Companion_2).
|
|
1671
|
-
protoOf(Companion_2).
|
|
1672
|
-
protoOf(SRGB).
|
|
1673
|
-
protoOf(SRGB).
|
|
1674
|
-
protoOf(SRGB).
|
|
1675
|
-
protoOf(RGBColorSpaceImpl).
|
|
1676
|
-
protoOf(RGBColorSpaceImpl).
|
|
1677
|
-
protoOf(RGBColorSpaceImpl).
|
|
1678
|
-
protoOf(RGBColorSpaceImpl).
|
|
1679
|
-
protoOf(RGBColorSpaceImpl).
|
|
1680
|
-
protoOf(RGBColorSpaceImpl).
|
|
1666
|
+
protoOf(Ansi16).p2n = toXYZ;
|
|
1667
|
+
protoOf(Ansi256).p2n = toXYZ;
|
|
1668
|
+
protoOf(HSV).p2n = toXYZ;
|
|
1669
|
+
protoOf(Companion_2).o2o = from255$default;
|
|
1670
|
+
protoOf(Companion_2).n2o = invoke$default;
|
|
1671
|
+
protoOf(Companion_2).s2o = invoke$default_0;
|
|
1672
|
+
protoOf(SRGB).o2o = from255$default;
|
|
1673
|
+
protoOf(SRGB).n2o = invoke$default;
|
|
1674
|
+
protoOf(SRGB).s2o = invoke$default_0;
|
|
1675
|
+
protoOf(RGBColorSpaceImpl).n2o = invoke$default;
|
|
1676
|
+
protoOf(RGBColorSpaceImpl).e2q = invoke;
|
|
1677
|
+
protoOf(RGBColorSpaceImpl).s2o = invoke$default_0;
|
|
1678
|
+
protoOf(RGBColorSpaceImpl).u2j = invoke_0;
|
|
1679
|
+
protoOf(RGBColorSpaceImpl).f2q = from255;
|
|
1680
|
+
protoOf(RGBColorSpaceImpl).o2o = from255$default;
|
|
1681
1681
|
//endregion
|
|
1682
1682
|
//region block: init
|
|
1683
1683
|
PqNonlinearity_instance = new PqNonlinearity();
|