@flock/wirespec 0.9.2 → 0.9.3
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.js +1126 -1126
- package/colormath-root-colormath.js +335 -335
- package/kotlin-kotlin-stdlib.js +8 -8
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-rgxgen.js +1760 -1760
- package/markdown.js +1792 -1792
- package/mordant-mordant.js +1498 -1498
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1125 -1107
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +231 -231
- package/wirespec-src-converter-openapi.js +223 -231
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-generator.js +18 -18
- package/wirespec-src-plugin-arguments.js +72 -72
- package/wirespec-src-plugin-cli.js +105 -105
- package/wirespec-src-plugin-npm.js +1 -1
|
@@ -66,21 +66,21 @@
|
|
|
66
66
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
67
67
|
function invoke$default(r, g, b, alpha, $super) {
|
|
68
68
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
69
|
-
return $super === VOID ? this.
|
|
69
|
+
return $super === VOID ? this.l2u(r, g, b, alpha) : $super.l2u.call(this, r, g, b, alpha);
|
|
70
70
|
}
|
|
71
71
|
function invoke(r, g, b, alpha) {
|
|
72
|
-
return this.
|
|
72
|
+
return this.l2u(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
73
73
|
}
|
|
74
74
|
function invoke$default_0(r, g, b, alpha, $super) {
|
|
75
75
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
76
|
-
return $super === VOID ? this.
|
|
76
|
+
return $super === VOID ? this.v2u(r, g, b, alpha) : invoke(r, g, b, alpha);
|
|
77
77
|
}
|
|
78
78
|
function from255(r, g, b, alpha) {
|
|
79
|
-
return this.
|
|
79
|
+
return this.l2u(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
80
80
|
}
|
|
81
81
|
function from255$default(r, g, b, alpha, $super) {
|
|
82
82
|
alpha = alpha === VOID ? 255 : alpha;
|
|
83
|
-
return $super === VOID ? this.
|
|
83
|
+
return $super === VOID ? this.w2u(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
84
84
|
}
|
|
85
85
|
function invoke_0(hex) {
|
|
86
86
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
} else {
|
|
101
101
|
tmp_2 = 255;
|
|
102
102
|
}
|
|
103
|
-
return this.
|
|
103
|
+
return this.w2u(tmp, tmp_0, tmp_1, tmp_2);
|
|
104
104
|
}
|
|
105
105
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta);
|
|
106
106
|
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
@@ -122,19 +122,19 @@
|
|
|
122
122
|
setMetadataFor(xyY, 'xyY', classMeta);
|
|
123
123
|
//endregion
|
|
124
124
|
function ColorComponentInfo(name, isPolar) {
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
125
|
+
this.f2t_1 = name;
|
|
126
|
+
this.g2t_1 = isPolar;
|
|
127
127
|
}
|
|
128
128
|
function WhitePoint(name, chromaticity) {
|
|
129
|
-
this.
|
|
130
|
-
this.
|
|
129
|
+
this.h2t_1 = name;
|
|
130
|
+
this.i2t_1 = chromaticity;
|
|
131
131
|
}
|
|
132
132
|
protoOf(WhitePoint).toString = function () {
|
|
133
|
-
return this.
|
|
133
|
+
return this.h2t_1;
|
|
134
134
|
};
|
|
135
135
|
protoOf(WhitePoint).hashCode = function () {
|
|
136
|
-
var result = getStringHashCode(this.
|
|
137
|
-
result = imul(result, 31) + this.
|
|
136
|
+
var result = getStringHashCode(this.h2t_1);
|
|
137
|
+
result = imul(result, 31) + this.i2t_1.hashCode() | 0;
|
|
138
138
|
return result;
|
|
139
139
|
};
|
|
140
140
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -143,22 +143,22 @@
|
|
|
143
143
|
if (!(other instanceof WhitePoint))
|
|
144
144
|
return false;
|
|
145
145
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
146
|
-
if (!(this.
|
|
146
|
+
if (!(this.h2t_1 === tmp0_other_with_cast.h2t_1))
|
|
147
147
|
return false;
|
|
148
|
-
if (!this.
|
|
148
|
+
if (!this.i2t_1.equals(tmp0_other_with_cast.i2t_1))
|
|
149
149
|
return false;
|
|
150
150
|
return true;
|
|
151
151
|
};
|
|
152
152
|
function Illuminant() {
|
|
153
153
|
Illuminant_instance = this;
|
|
154
|
-
this.
|
|
155
|
-
this.
|
|
156
|
-
this.
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
154
|
+
this.j2t_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
155
|
+
this.k2t_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
156
|
+
this.l2t_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
157
|
+
this.m2t_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
158
|
+
this.n2t_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
159
|
+
this.o2t_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
160
|
+
this.p2t_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
161
|
+
this.q2t_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
162
162
|
}
|
|
163
163
|
var Illuminant_instance;
|
|
164
164
|
function Illuminant_getInstance() {
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
}
|
|
346
346
|
function Companion() {
|
|
347
347
|
Companion_instance = this;
|
|
348
|
-
this.
|
|
348
|
+
this.r2t_1 = componentInfoList([new ColorComponentInfo('code', false)]);
|
|
349
349
|
}
|
|
350
350
|
var Companion_instance;
|
|
351
351
|
function Companion_getInstance() {
|
|
@@ -355,35 +355,35 @@
|
|
|
355
355
|
}
|
|
356
356
|
function Ansi16(code) {
|
|
357
357
|
Companion_getInstance();
|
|
358
|
-
this.
|
|
358
|
+
this.s2t_1 = code;
|
|
359
359
|
}
|
|
360
|
-
protoOf(Ansi16).
|
|
361
|
-
switch (this.
|
|
360
|
+
protoOf(Ansi16).t2t = function () {
|
|
361
|
+
switch (this.s2t_1) {
|
|
362
362
|
case 30:
|
|
363
363
|
case 40:
|
|
364
|
-
return Companion_getInstance_2().
|
|
364
|
+
return Companion_getInstance_2().u2t(0.0, 0.0, 0.0);
|
|
365
365
|
case 90:
|
|
366
366
|
case 100:
|
|
367
|
-
return Companion_getInstance_2().
|
|
367
|
+
return Companion_getInstance_2().v2t(128, 128, 128);
|
|
368
368
|
case 37:
|
|
369
369
|
case 47:
|
|
370
|
-
return Companion_getInstance_2().
|
|
370
|
+
return Companion_getInstance_2().v2t(192, 192, 192);
|
|
371
371
|
case 97:
|
|
372
372
|
case 107:
|
|
373
|
-
return Companion_getInstance_2().
|
|
373
|
+
return Companion_getInstance_2().u2t(1.0, 1.0, 1.0);
|
|
374
374
|
}
|
|
375
|
-
var color = this.
|
|
376
|
-
var mul = this.
|
|
375
|
+
var color = this.s2t_1 % 10 | 0;
|
|
376
|
+
var mul = this.s2t_1 > 50 ? 1.0 : 0.5;
|
|
377
377
|
var r = (color % 2 | 0) * mul;
|
|
378
378
|
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
379
379
|
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
380
|
-
return Companion_getInstance_2().
|
|
380
|
+
return Companion_getInstance_2().u2t(r, g, b);
|
|
381
381
|
};
|
|
382
382
|
protoOf(Ansi16).toString = function () {
|
|
383
|
-
return 'Ansi16(code=' + this.
|
|
383
|
+
return 'Ansi16(code=' + this.s2t_1 + ')';
|
|
384
384
|
};
|
|
385
385
|
protoOf(Ansi16).hashCode = function () {
|
|
386
|
-
return this.
|
|
386
|
+
return this.s2t_1;
|
|
387
387
|
};
|
|
388
388
|
protoOf(Ansi16).equals = function (other) {
|
|
389
389
|
if (this === other)
|
|
@@ -391,13 +391,13 @@
|
|
|
391
391
|
if (!(other instanceof Ansi16))
|
|
392
392
|
return false;
|
|
393
393
|
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
394
|
-
if (!(this.
|
|
394
|
+
if (!(this.s2t_1 === tmp0_other_with_cast.s2t_1))
|
|
395
395
|
return false;
|
|
396
396
|
return true;
|
|
397
397
|
};
|
|
398
398
|
function Companion_0() {
|
|
399
399
|
Companion_instance_0 = this;
|
|
400
|
-
this.
|
|
400
|
+
this.w2t_1 = componentInfoList([new ColorComponentInfo('code', false)]);
|
|
401
401
|
}
|
|
402
402
|
var Companion_instance_0;
|
|
403
403
|
function Companion_getInstance_0() {
|
|
@@ -407,16 +407,16 @@
|
|
|
407
407
|
}
|
|
408
408
|
function Ansi256(code) {
|
|
409
409
|
Companion_getInstance_0();
|
|
410
|
-
this.
|
|
411
|
-
}
|
|
412
|
-
protoOf(Ansi256).
|
|
413
|
-
if (this.
|
|
414
|
-
return this.
|
|
415
|
-
if (this.
|
|
416
|
-
var c = imul(this.
|
|
417
|
-
return Companion_getInstance_2().
|
|
410
|
+
this.x2t_1 = code;
|
|
411
|
+
}
|
|
412
|
+
protoOf(Ansi256).t2t = function () {
|
|
413
|
+
if (this.x2t_1 < 16)
|
|
414
|
+
return this.y2t().t2t();
|
|
415
|
+
if (this.x2t_1 >= 232) {
|
|
416
|
+
var c = imul(this.x2t_1 - 232 | 0, 10) + 8 | 0;
|
|
417
|
+
return Companion_getInstance_2().v2t(c, c, c);
|
|
418
418
|
}
|
|
419
|
-
var c_0 = this.
|
|
419
|
+
var c_0 = this.x2t_1 - 16 | 0;
|
|
420
420
|
var rem = c_0 % 36 | 0;
|
|
421
421
|
// Inline function 'kotlin.math.floor' call
|
|
422
422
|
var tmp0_floor = c_0 / 36.0;
|
|
@@ -425,16 +425,16 @@
|
|
|
425
425
|
var tmp1_floor = rem / 6.0;
|
|
426
426
|
var g = Math.floor(tmp1_floor) / 5.0;
|
|
427
427
|
var b = (rem % 6 | 0) / 5.0;
|
|
428
|
-
return Companion_getInstance_2().
|
|
428
|
+
return Companion_getInstance_2().z2t(r, g, b);
|
|
429
429
|
};
|
|
430
|
-
protoOf(Ansi256).
|
|
431
|
-
return this.
|
|
430
|
+
protoOf(Ansi256).y2t = function () {
|
|
431
|
+
return this.x2t_1 < 8 ? new Ansi16(this.x2t_1 + 30 | 0) : this.x2t_1 < 16 ? new Ansi16((this.x2t_1 - 8 | 0) + 90 | 0) : this.t2t().y2t();
|
|
432
432
|
};
|
|
433
433
|
protoOf(Ansi256).toString = function () {
|
|
434
|
-
return 'Ansi256(code=' + this.
|
|
434
|
+
return 'Ansi256(code=' + this.x2t_1 + ')';
|
|
435
435
|
};
|
|
436
436
|
protoOf(Ansi256).hashCode = function () {
|
|
437
|
-
return this.
|
|
437
|
+
return this.x2t_1;
|
|
438
438
|
};
|
|
439
439
|
protoOf(Ansi256).equals = function (other) {
|
|
440
440
|
if (this === other)
|
|
@@ -442,13 +442,13 @@
|
|
|
442
442
|
if (!(other instanceof Ansi256))
|
|
443
443
|
return false;
|
|
444
444
|
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
445
|
-
if (!(this.
|
|
445
|
+
if (!(this.x2t_1 === tmp0_other_with_cast.x2t_1))
|
|
446
446
|
return false;
|
|
447
447
|
return true;
|
|
448
448
|
};
|
|
449
449
|
function Companion_1() {
|
|
450
450
|
Companion_instance_1 = this;
|
|
451
|
-
this.
|
|
451
|
+
this.f2u_1 = polarComponentInfo('HSV');
|
|
452
452
|
}
|
|
453
453
|
var Companion_instance_1;
|
|
454
454
|
function Companion_getInstance_1() {
|
|
@@ -468,27 +468,27 @@
|
|
|
468
468
|
function HSV(h, s, v, alpha) {
|
|
469
469
|
Companion_getInstance_1();
|
|
470
470
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
471
|
-
this.
|
|
472
|
-
this.
|
|
473
|
-
this.
|
|
474
|
-
this.
|
|
475
|
-
}
|
|
476
|
-
protoOf(HSV).
|
|
477
|
-
if (this.
|
|
478
|
-
return Companion_getInstance_2().
|
|
479
|
-
var v = this.
|
|
480
|
-
var h = normalizeDeg_0(this.
|
|
481
|
-
var s = this.
|
|
482
|
-
return SRGB_getInstance().
|
|
471
|
+
this.g2u_1 = h;
|
|
472
|
+
this.h2u_1 = s;
|
|
473
|
+
this.i2u_1 = v;
|
|
474
|
+
this.j2u_1 = alpha;
|
|
475
|
+
}
|
|
476
|
+
protoOf(HSV).t2t = function () {
|
|
477
|
+
if (this.h2u_1 < 1.0E-7)
|
|
478
|
+
return Companion_getInstance_2().l2u(this.i2u_1, this.i2u_1, this.i2u_1, this.j2u_1);
|
|
479
|
+
var v = this.i2u_1;
|
|
480
|
+
var h = normalizeDeg_0(this.g2u_1) / 60.0;
|
|
481
|
+
var s = this.h2u_1;
|
|
482
|
+
return SRGB_getInstance().l2u(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.j2u_1);
|
|
483
483
|
};
|
|
484
484
|
protoOf(HSV).toString = function () {
|
|
485
|
-
return 'HSV(h=' + this.
|
|
485
|
+
return 'HSV(h=' + this.g2u_1 + ', s=' + this.h2u_1 + ', v=' + this.i2u_1 + ', alpha=' + this.j2u_1 + ')';
|
|
486
486
|
};
|
|
487
487
|
protoOf(HSV).hashCode = function () {
|
|
488
|
-
var result = getNumberHashCode(this.
|
|
489
|
-
result = imul(result, 31) + getNumberHashCode(this.g2u_1) | 0;
|
|
488
|
+
var result = getNumberHashCode(this.g2u_1);
|
|
490
489
|
result = imul(result, 31) + getNumberHashCode(this.h2u_1) | 0;
|
|
491
490
|
result = imul(result, 31) + getNumberHashCode(this.i2u_1) | 0;
|
|
491
|
+
result = imul(result, 31) + getNumberHashCode(this.j2u_1) | 0;
|
|
492
492
|
return result;
|
|
493
493
|
};
|
|
494
494
|
protoOf(HSV).equals = function (other) {
|
|
@@ -497,30 +497,30 @@
|
|
|
497
497
|
if (!(other instanceof HSV))
|
|
498
498
|
return false;
|
|
499
499
|
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
500
|
-
if (!equals(this.f2u_1, tmp0_other_with_cast.f2u_1))
|
|
501
|
-
return false;
|
|
502
500
|
if (!equals(this.g2u_1, tmp0_other_with_cast.g2u_1))
|
|
503
501
|
return false;
|
|
504
502
|
if (!equals(this.h2u_1, tmp0_other_with_cast.h2u_1))
|
|
505
503
|
return false;
|
|
506
504
|
if (!equals(this.i2u_1, tmp0_other_with_cast.i2u_1))
|
|
507
505
|
return false;
|
|
506
|
+
if (!equals(this.j2u_1, tmp0_other_with_cast.j2u_1))
|
|
507
|
+
return false;
|
|
508
508
|
return true;
|
|
509
509
|
};
|
|
510
510
|
function GammaTransferFunctions(gamma) {
|
|
511
|
-
this.
|
|
511
|
+
this.s2u_1 = gamma;
|
|
512
512
|
}
|
|
513
|
-
protoOf(GammaTransferFunctions).s2u = function (x) {
|
|
514
|
-
return spow(x, this.r2u_1);
|
|
515
|
-
};
|
|
516
513
|
protoOf(GammaTransferFunctions).t2u = function (x) {
|
|
517
|
-
return spow(x,
|
|
514
|
+
return spow(x, this.s2u_1);
|
|
515
|
+
};
|
|
516
|
+
protoOf(GammaTransferFunctions).u2u = function (x) {
|
|
517
|
+
return spow(x, 1.0 / this.s2u_1);
|
|
518
518
|
};
|
|
519
519
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
520
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
520
|
+
return 'GammaTransferFunctions(gamma=' + this.s2u_1 + ')';
|
|
521
521
|
};
|
|
522
522
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
523
|
-
return getNumberHashCode(this.
|
|
523
|
+
return getNumberHashCode(this.s2u_1);
|
|
524
524
|
};
|
|
525
525
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
526
526
|
if (this === other)
|
|
@@ -528,17 +528,17 @@
|
|
|
528
528
|
if (!(other instanceof GammaTransferFunctions))
|
|
529
529
|
return false;
|
|
530
530
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
531
|
-
if (!equals(this.
|
|
531
|
+
if (!equals(this.s2u_1, tmp0_other_with_cast.s2u_1))
|
|
532
532
|
return false;
|
|
533
533
|
return true;
|
|
534
534
|
};
|
|
535
535
|
function LinearTransferFunctions() {
|
|
536
536
|
LinearTransferFunctions_instance = this;
|
|
537
537
|
}
|
|
538
|
-
protoOf(LinearTransferFunctions).
|
|
538
|
+
protoOf(LinearTransferFunctions).t2u = function (x) {
|
|
539
539
|
return x;
|
|
540
540
|
};
|
|
541
|
-
protoOf(LinearTransferFunctions).
|
|
541
|
+
protoOf(LinearTransferFunctions).u2u = function (x) {
|
|
542
542
|
return x;
|
|
543
543
|
};
|
|
544
544
|
var LinearTransferFunctions_instance;
|
|
@@ -551,31 +551,31 @@
|
|
|
551
551
|
}
|
|
552
552
|
function Companion_2() {
|
|
553
553
|
Companion_instance_2 = this;
|
|
554
|
-
this.
|
|
554
|
+
this.k2u_1 = RGBColorSpaces_getInstance().b2v_1;
|
|
555
555
|
}
|
|
556
|
+
protoOf(Companion_2).z2u = function () {
|
|
557
|
+
return this.k2u_1.z2u();
|
|
558
|
+
};
|
|
556
559
|
protoOf(Companion_2).y2u = function () {
|
|
557
|
-
return this.
|
|
560
|
+
return this.k2u_1.y2u();
|
|
558
561
|
};
|
|
559
562
|
protoOf(Companion_2).x2u = function () {
|
|
560
|
-
return this.
|
|
563
|
+
return this.k2u_1.x2u();
|
|
561
564
|
};
|
|
562
|
-
protoOf(Companion_2).
|
|
563
|
-
return this.
|
|
565
|
+
protoOf(Companion_2).a2v = function () {
|
|
566
|
+
return this.k2u_1.a2v();
|
|
564
567
|
};
|
|
565
|
-
protoOf(Companion_2).
|
|
566
|
-
return this.
|
|
568
|
+
protoOf(Companion_2).w2u = function (r, g, b, alpha) {
|
|
569
|
+
return this.k2u_1.w2u(r, g, b, alpha);
|
|
567
570
|
};
|
|
568
|
-
protoOf(Companion_2).
|
|
569
|
-
return this.
|
|
570
|
-
};
|
|
571
|
-
protoOf(Companion_2).k2u = function (r, g, b, alpha) {
|
|
572
|
-
return this.j2u_1.k2u(r, g, b, alpha);
|
|
571
|
+
protoOf(Companion_2).l2u = function (r, g, b, alpha) {
|
|
572
|
+
return this.k2u_1.l2u(r, g, b, alpha);
|
|
573
573
|
};
|
|
574
|
-
protoOf(Companion_2).
|
|
575
|
-
return this.
|
|
574
|
+
protoOf(Companion_2).v2u = function (r, g, b, alpha) {
|
|
575
|
+
return this.k2u_1.v2u(r, g, b, alpha);
|
|
576
576
|
};
|
|
577
|
-
protoOf(Companion_2).
|
|
578
|
-
return this.
|
|
577
|
+
protoOf(Companion_2).o1z = function (hex) {
|
|
578
|
+
return this.k2u_1.o1z(hex);
|
|
579
579
|
};
|
|
580
580
|
var Companion_instance_2;
|
|
581
581
|
function Companion_getInstance_2() {
|
|
@@ -585,17 +585,12 @@
|
|
|
585
585
|
}
|
|
586
586
|
function RGB(r, g, b, alpha, space) {
|
|
587
587
|
Companion_getInstance_2();
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
590
|
-
this.
|
|
591
|
-
this.
|
|
592
|
-
this.
|
|
588
|
+
this.a2u_1 = r;
|
|
589
|
+
this.b2u_1 = g;
|
|
590
|
+
this.c2u_1 = b;
|
|
591
|
+
this.d2u_1 = alpha;
|
|
592
|
+
this.e2u_1 = space;
|
|
593
593
|
}
|
|
594
|
-
protoOf(RGB).m2v = function () {
|
|
595
|
-
// Inline function 'kotlin.math.roundToInt' call
|
|
596
|
-
var tmp0_roundToInt = this.z2t_1 * 255;
|
|
597
|
-
return roundToInt(tmp0_roundToInt);
|
|
598
|
-
};
|
|
599
594
|
protoOf(RGB).n2v = function () {
|
|
600
595
|
// Inline function 'kotlin.math.roundToInt' call
|
|
601
596
|
var tmp0_roundToInt = this.a2u_1 * 255;
|
|
@@ -606,22 +601,27 @@
|
|
|
606
601
|
var tmp0_roundToInt = this.b2u_1 * 255;
|
|
607
602
|
return roundToInt(tmp0_roundToInt);
|
|
608
603
|
};
|
|
609
|
-
protoOf(RGB).p2v = function (
|
|
610
|
-
|
|
611
|
-
|
|
604
|
+
protoOf(RGB).p2v = function () {
|
|
605
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
606
|
+
var tmp0_roundToInt = this.c2u_1 * 255;
|
|
607
|
+
return roundToInt(tmp0_roundToInt);
|
|
608
|
+
};
|
|
609
|
+
protoOf(RGB).q2v = function (space) {
|
|
610
|
+
var f = SRGB_getInstance().p2u_1;
|
|
611
|
+
return equals(this.e2u_1, space) ? this : (equals(this.e2u_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().c2v_1) : false) ? space.l2u(f.t2u(this.a2u_1), f.t2u(this.b2u_1), f.t2u(this.c2u_1), this.d2u_1) : (equals(this.e2u_1, RGBColorSpaces_getInstance().c2v_1) ? equals(space, SRGB_getInstance()) : false) ? space.l2u(f.u2u(this.a2u_1), f.u2u(this.b2u_1), f.u2u(this.c2u_1), this.d2u_1) : this.r2v().x2v(space);
|
|
612
612
|
};
|
|
613
|
-
protoOf(RGB).
|
|
614
|
-
return this.
|
|
613
|
+
protoOf(RGB).y2v = function () {
|
|
614
|
+
return this.z2v(coerceIn(this.a2u_1, 0.0, 1.0), coerceIn(this.b2u_1, 0.0, 1.0), coerceIn(this.c2u_1, 0.0, 1.0), coerceIn(this.d2u_1, 0.0, 1.0));
|
|
615
615
|
};
|
|
616
|
-
protoOf(RGB).
|
|
616
|
+
protoOf(RGB).a2w = function () {
|
|
617
617
|
var tmp$ret$3;
|
|
618
618
|
$l$block: {
|
|
619
619
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
620
620
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
621
|
-
var tmp0_anonymous = this.
|
|
622
|
-
var r = tmp0_anonymous.
|
|
623
|
-
var g = tmp0_anonymous.
|
|
624
|
-
var b = tmp0_anonymous.
|
|
621
|
+
var tmp0_anonymous = this.q2v(SRGB_getInstance());
|
|
622
|
+
var r = tmp0_anonymous.a2u_1;
|
|
623
|
+
var g = tmp0_anonymous.b2u_1;
|
|
624
|
+
var b = tmp0_anonymous.c2u_1;
|
|
625
625
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
626
626
|
var min = Math.min(r, g, b);
|
|
627
627
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -644,98 +644,98 @@
|
|
|
644
644
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
645
645
|
var tmp0_anonymous_0 = normalizeDeg(h);
|
|
646
646
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
647
|
-
tmp$ret$3 = new HSV(tmp0_anonymous_0, s, max, this.
|
|
647
|
+
tmp$ret$3 = new HSV(tmp0_anonymous_0, s, max, this.d2u_1);
|
|
648
648
|
break $l$block;
|
|
649
649
|
}
|
|
650
650
|
return tmp$ret$3;
|
|
651
651
|
};
|
|
652
|
-
protoOf(RGB).
|
|
653
|
-
var f = this.
|
|
652
|
+
protoOf(RGB).r2v = function () {
|
|
653
|
+
var f = this.e2u_1.x2u();
|
|
654
654
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
655
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.
|
|
656
|
-
var tmp1_dot = f.
|
|
657
|
-
var tmp2_dot = f.
|
|
658
|
-
var tmp3_dot = f.
|
|
655
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.e2u_1.y2u());
|
|
656
|
+
var tmp1_dot = f.t2u(this.a2u_1);
|
|
657
|
+
var tmp2_dot = f.t2u(this.b2u_1);
|
|
658
|
+
var tmp3_dot = f.t2u(this.c2u_1);
|
|
659
659
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
660
660
|
var tmp4_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
661
661
|
var tmp5_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
662
662
|
var tmp6_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * tmp3_dot;
|
|
663
|
-
return XYZColorSpace(this.
|
|
663
|
+
return XYZColorSpace(this.e2u_1.a2v()).l2u(tmp4_anonymous, tmp5_anonymous, tmp6_anonymous, this.d2u_1);
|
|
664
664
|
};
|
|
665
|
-
protoOf(RGB).
|
|
665
|
+
protoOf(RGB).y2t = function () {
|
|
666
666
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
667
|
-
var tmp0_anonymous = this.
|
|
667
|
+
var tmp0_anonymous = this.q2v(SRGB_getInstance());
|
|
668
668
|
// Inline function 'kotlin.math.roundToInt' call
|
|
669
|
-
var tmp0_roundToInt = tmp0_anonymous.
|
|
669
|
+
var tmp0_roundToInt = tmp0_anonymous.a2w().i2u_1 * 100;
|
|
670
670
|
var value = roundToInt(tmp0_roundToInt);
|
|
671
671
|
if (value === 30)
|
|
672
672
|
return new Ansi16(30);
|
|
673
673
|
var v = value / 50 | 0;
|
|
674
674
|
var tmp$ret$1;
|
|
675
675
|
// Inline function 'kotlin.math.roundToInt' call
|
|
676
|
-
var tmp1_roundToInt = tmp0_anonymous.
|
|
676
|
+
var tmp1_roundToInt = tmp0_anonymous.c2u_1;
|
|
677
677
|
tmp$ret$1 = roundToInt(tmp1_roundToInt);
|
|
678
678
|
var tmp = imul(tmp$ret$1, 4);
|
|
679
679
|
var tmp$ret$2;
|
|
680
680
|
// Inline function 'kotlin.math.roundToInt' call
|
|
681
|
-
var tmp2_roundToInt = tmp0_anonymous.
|
|
681
|
+
var tmp2_roundToInt = tmp0_anonymous.b2u_1;
|
|
682
682
|
tmp$ret$2 = roundToInt(tmp2_roundToInt);
|
|
683
683
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
684
684
|
// Inline function 'kotlin.math.roundToInt' call
|
|
685
|
-
var tmp3_roundToInt = tmp0_anonymous.
|
|
685
|
+
var tmp3_roundToInt = tmp0_anonymous.a2u_1;
|
|
686
686
|
var ansi = 30 + (tmp_0 | roundToInt(tmp3_roundToInt)) | 0;
|
|
687
687
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
688
688
|
};
|
|
689
|
-
protoOf(RGB).
|
|
689
|
+
protoOf(RGB).b2w = function () {
|
|
690
690
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
691
|
-
var tmp0_anonymous = this.
|
|
692
|
-
var ri = tmp0_anonymous.
|
|
693
|
-
var gi = tmp0_anonymous.
|
|
694
|
-
var bi = tmp0_anonymous.
|
|
691
|
+
var tmp0_anonymous = this.q2v(SRGB_getInstance());
|
|
692
|
+
var ri = tmp0_anonymous.n2v();
|
|
693
|
+
var gi = tmp0_anonymous.o2v();
|
|
694
|
+
var bi = tmp0_anonymous.p2v();
|
|
695
695
|
var tmp;
|
|
696
696
|
if (ri === gi ? gi === bi : false) {
|
|
697
697
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
698
698
|
} else {
|
|
699
699
|
var tmp$ret$0;
|
|
700
700
|
// Inline function 'kotlin.math.roundToInt' call
|
|
701
|
-
var tmp0_roundToInt = tmp0_anonymous.
|
|
701
|
+
var tmp0_roundToInt = tmp0_anonymous.a2u_1 * 5;
|
|
702
702
|
tmp$ret$0 = roundToInt(tmp0_roundToInt);
|
|
703
703
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
704
704
|
var tmp$ret$1;
|
|
705
705
|
// Inline function 'kotlin.math.roundToInt' call
|
|
706
|
-
var tmp1_roundToInt = tmp0_anonymous.
|
|
706
|
+
var tmp1_roundToInt = tmp0_anonymous.b2u_1 * 5;
|
|
707
707
|
tmp$ret$1 = roundToInt(tmp1_roundToInt);
|
|
708
708
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
709
709
|
// Inline function 'kotlin.math.roundToInt' call
|
|
710
|
-
var tmp2_roundToInt = tmp0_anonymous.
|
|
710
|
+
var tmp2_roundToInt = tmp0_anonymous.c2u_1 * 5;
|
|
711
711
|
tmp = tmp_1 + roundToInt(tmp2_roundToInt) | 0;
|
|
712
712
|
}
|
|
713
713
|
var code = tmp;
|
|
714
714
|
return new Ansi256(code);
|
|
715
715
|
};
|
|
716
|
-
protoOf(RGB).
|
|
717
|
-
return this.
|
|
716
|
+
protoOf(RGB).t2t = function () {
|
|
717
|
+
return this.q2v(RGBColorSpaces_getInstance().b2v_1);
|
|
718
718
|
};
|
|
719
|
-
protoOf(RGB).
|
|
719
|
+
protoOf(RGB).c2w = function (r, g, b, alpha, space) {
|
|
720
720
|
return new RGB(r, g, b, alpha, space);
|
|
721
721
|
};
|
|
722
|
-
protoOf(RGB).
|
|
723
|
-
r = r === VOID ? this.
|
|
724
|
-
g = g === VOID ? this.
|
|
725
|
-
b = b === VOID ? this.
|
|
726
|
-
alpha = alpha === VOID ? this.
|
|
727
|
-
space = space === VOID ? this.
|
|
728
|
-
return $super === VOID ? this.
|
|
722
|
+
protoOf(RGB).z2v = function (r, g, b, alpha, space, $super) {
|
|
723
|
+
r = r === VOID ? this.a2u_1 : r;
|
|
724
|
+
g = g === VOID ? this.b2u_1 : g;
|
|
725
|
+
b = b === VOID ? this.c2u_1 : b;
|
|
726
|
+
alpha = alpha === VOID ? this.d2u_1 : alpha;
|
|
727
|
+
space = space === VOID ? this.e2u_1 : space;
|
|
728
|
+
return $super === VOID ? this.c2w(r, g, b, alpha, space) : $super.c2w.call(this, r, g, b, alpha, space);
|
|
729
729
|
};
|
|
730
730
|
protoOf(RGB).toString = function () {
|
|
731
|
-
return 'RGB(r=' + this.
|
|
731
|
+
return 'RGB(r=' + this.a2u_1 + ', g=' + this.b2u_1 + ', b=' + this.c2u_1 + ', alpha=' + this.d2u_1 + ', space=' + this.e2u_1 + ')';
|
|
732
732
|
};
|
|
733
733
|
protoOf(RGB).hashCode = function () {
|
|
734
|
-
var result = getNumberHashCode(this.
|
|
735
|
-
result = imul(result, 31) + getNumberHashCode(this.a2u_1) | 0;
|
|
734
|
+
var result = getNumberHashCode(this.a2u_1);
|
|
736
735
|
result = imul(result, 31) + getNumberHashCode(this.b2u_1) | 0;
|
|
737
736
|
result = imul(result, 31) + getNumberHashCode(this.c2u_1) | 0;
|
|
738
|
-
result = imul(result, 31) +
|
|
737
|
+
result = imul(result, 31) + getNumberHashCode(this.d2u_1) | 0;
|
|
738
|
+
result = imul(result, 31) + hashCode(this.e2u_1) | 0;
|
|
739
739
|
return result;
|
|
740
740
|
};
|
|
741
741
|
protoOf(RGB).equals = function (other) {
|
|
@@ -744,8 +744,6 @@
|
|
|
744
744
|
if (!(other instanceof RGB))
|
|
745
745
|
return false;
|
|
746
746
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
747
|
-
if (!equals(this.z2t_1, tmp0_other_with_cast.z2t_1))
|
|
748
|
-
return false;
|
|
749
747
|
if (!equals(this.a2u_1, tmp0_other_with_cast.a2u_1))
|
|
750
748
|
return false;
|
|
751
749
|
if (!equals(this.b2u_1, tmp0_other_with_cast.b2u_1))
|
|
@@ -754,6 +752,8 @@
|
|
|
754
752
|
return false;
|
|
755
753
|
if (!equals(this.d2u_1, tmp0_other_with_cast.d2u_1))
|
|
756
754
|
return false;
|
|
755
|
+
if (!equals(this.e2u_1, tmp0_other_with_cast.e2u_1))
|
|
756
|
+
return false;
|
|
757
757
|
return true;
|
|
758
758
|
};
|
|
759
759
|
function parseHex(_this__u8e3s4, startIndex) {
|
|
@@ -856,18 +856,18 @@
|
|
|
856
856
|
var ACES_AP1_B;
|
|
857
857
|
function RGBColorSpaces() {
|
|
858
858
|
RGBColorSpaces_instance = this;
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
864
|
-
this.
|
|
865
|
-
this.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
868
|
-
this.
|
|
869
|
-
this.
|
|
870
|
-
this.
|
|
859
|
+
this.b2v_1 = SRGB_getInstance();
|
|
860
|
+
this.c2v_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().o2t_1, LinearTransferFunctions_getInstance(), get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
861
|
+
this.d2v_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
862
|
+
this.e2v_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
863
|
+
this.f2v_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
864
|
+
this.g2v_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
865
|
+
this.h2v_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().o2t_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));
|
|
866
|
+
this.i2v_1 = BT2020Space_getInstance();
|
|
867
|
+
this.j2v_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().o2t_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
868
|
+
this.k2v_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));
|
|
869
|
+
this.l2v_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().o2t_1, SRGBTransferFunctions_getInstance(), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
870
|
+
this.m2v_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().m2t_1, ROMMTransferFunctions_getInstance(), xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
871
871
|
}
|
|
872
872
|
var RGBColorSpaces_instance;
|
|
873
873
|
function RGBColorSpaces_getInstance() {
|
|
@@ -877,17 +877,14 @@
|
|
|
877
877
|
}
|
|
878
878
|
function SRGB() {
|
|
879
879
|
SRGB_instance = this;
|
|
880
|
-
this.
|
|
881
|
-
this.
|
|
882
|
-
this.
|
|
883
|
-
this.
|
|
884
|
-
this.
|
|
885
|
-
this.
|
|
886
|
-
}
|
|
887
|
-
protoOf(SRGB).
|
|
888
|
-
return this.n2u_1;
|
|
889
|
-
};
|
|
890
|
-
protoOf(SRGB).w2u = function () {
|
|
880
|
+
this.m2u_1 = 'sRGB';
|
|
881
|
+
this.n2u_1 = rectangularComponentInfo('RGB');
|
|
882
|
+
this.o2u_1 = Illuminant_getInstance().o2t_1;
|
|
883
|
+
this.p2u_1 = SRGBTransferFunctions_getInstance();
|
|
884
|
+
this.q2u_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.o2u_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
885
|
+
this.r2u_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.q2u_1)));
|
|
886
|
+
}
|
|
887
|
+
protoOf(SRGB).a2v = function () {
|
|
891
888
|
return this.o2u_1;
|
|
892
889
|
};
|
|
893
890
|
protoOf(SRGB).x2u = function () {
|
|
@@ -896,10 +893,13 @@
|
|
|
896
893
|
protoOf(SRGB).y2u = function () {
|
|
897
894
|
return this.q2u_1;
|
|
898
895
|
};
|
|
896
|
+
protoOf(SRGB).z2u = function () {
|
|
897
|
+
return this.r2u_1;
|
|
898
|
+
};
|
|
899
899
|
protoOf(SRGB).toString = function () {
|
|
900
|
-
return this.
|
|
900
|
+
return this.m2u_1;
|
|
901
901
|
};
|
|
902
|
-
protoOf(SRGB).
|
|
902
|
+
protoOf(SRGB).l2u = function (r, g, b, alpha) {
|
|
903
903
|
return new RGB(r, g, b, alpha, this);
|
|
904
904
|
};
|
|
905
905
|
var SRGB_instance;
|
|
@@ -914,18 +914,18 @@
|
|
|
914
914
|
}
|
|
915
915
|
function ACESccTransferFunctions() {
|
|
916
916
|
ACESccTransferFunctions_instance = this;
|
|
917
|
-
this.
|
|
918
|
-
this.
|
|
919
|
-
this.
|
|
917
|
+
this.d2w_1 = 3.0517578125E-5;
|
|
918
|
+
this.e2w_1 = 1.52587890625E-5;
|
|
919
|
+
this.f2w_1 = -0.3013698630136986;
|
|
920
920
|
var tmp = this;
|
|
921
921
|
// Inline function 'kotlin.math.log2' call
|
|
922
|
-
tmp.
|
|
922
|
+
tmp.g2w_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
923
923
|
}
|
|
924
|
-
protoOf(ACESccTransferFunctions).
|
|
924
|
+
protoOf(ACESccTransferFunctions).t2u = function (x) {
|
|
925
925
|
var tmp;
|
|
926
926
|
if (x <= -0.3013698630136986) {
|
|
927
927
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
928
|
-
} else if (x < this.
|
|
928
|
+
} else if (x < this.g2w_1) {
|
|
929
929
|
// Inline function 'kotlin.math.pow' call
|
|
930
930
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
931
931
|
tmp = Math.pow(2.0, tmp0_pow);
|
|
@@ -934,7 +934,7 @@
|
|
|
934
934
|
}
|
|
935
935
|
return tmp;
|
|
936
936
|
};
|
|
937
|
-
protoOf(ACESccTransferFunctions).
|
|
937
|
+
protoOf(ACESccTransferFunctions).u2u = function (x) {
|
|
938
938
|
var tmp;
|
|
939
939
|
if (x < 3.0517578125E-5) {
|
|
940
940
|
// Inline function 'kotlin.math.log2' call
|
|
@@ -954,17 +954,17 @@
|
|
|
954
954
|
}
|
|
955
955
|
function ACEScctTransferFunctions() {
|
|
956
956
|
ACEScctTransferFunctions_instance = this;
|
|
957
|
-
this.
|
|
958
|
-
this.
|
|
957
|
+
this.h2w_1 = 10.5402377416545;
|
|
958
|
+
this.i2w_1 = 0.0729055341958355;
|
|
959
959
|
var tmp = this;
|
|
960
960
|
// Inline function 'kotlin.math.log2' call
|
|
961
|
-
tmp.
|
|
961
|
+
tmp.j2w_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
962
962
|
}
|
|
963
|
-
protoOf(ACEScctTransferFunctions).
|
|
963
|
+
protoOf(ACEScctTransferFunctions).t2u = function (x) {
|
|
964
964
|
var tmp;
|
|
965
965
|
if (x <= 0.155251141552511) {
|
|
966
966
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
967
|
-
} else if (x < this.
|
|
967
|
+
} else if (x < this.j2w_1) {
|
|
968
968
|
// Inline function 'kotlin.math.pow' call
|
|
969
969
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
970
970
|
tmp = Math.pow(2.0, tmp0_pow);
|
|
@@ -973,7 +973,7 @@
|
|
|
973
973
|
}
|
|
974
974
|
return tmp;
|
|
975
975
|
};
|
|
976
|
-
protoOf(ACEScctTransferFunctions).
|
|
976
|
+
protoOf(ACEScctTransferFunctions).u2u = function (x) {
|
|
977
977
|
var tmp;
|
|
978
978
|
if (x < 0.0078125) {
|
|
979
979
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -991,30 +991,30 @@
|
|
|
991
991
|
}
|
|
992
992
|
function BT2020Space() {
|
|
993
993
|
BT2020Space_instance = this;
|
|
994
|
-
this.
|
|
995
|
-
this.
|
|
996
|
-
this.
|
|
997
|
-
this.
|
|
998
|
-
this.
|
|
999
|
-
this.
|
|
1000
|
-
}
|
|
1001
|
-
protoOf(BT2020Space).
|
|
1002
|
-
return this.l2w_1;
|
|
1003
|
-
};
|
|
1004
|
-
protoOf(BT2020Space).w2u = function () {
|
|
994
|
+
this.k2w_1 = 'BT.2020';
|
|
995
|
+
this.l2w_1 = rectangularComponentInfo('RGB');
|
|
996
|
+
this.m2w_1 = Illuminant_getInstance().o2t_1;
|
|
997
|
+
this.n2w_1 = BT2020TransferFunctions_getInstance();
|
|
998
|
+
this.o2w_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.m2w_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
|
|
999
|
+
this.p2w_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.o2w_1)));
|
|
1000
|
+
}
|
|
1001
|
+
protoOf(BT2020Space).a2v = function () {
|
|
1005
1002
|
return this.m2w_1;
|
|
1006
1003
|
};
|
|
1007
|
-
protoOf(BT2020Space).k2u = function (r, g, b, alpha) {
|
|
1008
|
-
return new RGB(r, g, b, alpha, this);
|
|
1009
|
-
};
|
|
1010
1004
|
protoOf(BT2020Space).x2u = function () {
|
|
1011
1005
|
return this.n2w_1;
|
|
1012
1006
|
};
|
|
1007
|
+
protoOf(BT2020Space).l2u = function (r, g, b, alpha) {
|
|
1008
|
+
return new RGB(r, g, b, alpha, this);
|
|
1009
|
+
};
|
|
1013
1010
|
protoOf(BT2020Space).y2u = function () {
|
|
1014
1011
|
return this.o2w_1;
|
|
1015
1012
|
};
|
|
1013
|
+
protoOf(BT2020Space).z2u = function () {
|
|
1014
|
+
return this.p2w_1;
|
|
1015
|
+
};
|
|
1016
1016
|
protoOf(BT2020Space).toString = function () {
|
|
1017
|
-
return this.
|
|
1017
|
+
return this.k2w_1;
|
|
1018
1018
|
};
|
|
1019
1019
|
var BT2020Space_instance;
|
|
1020
1020
|
function BT2020Space_getInstance() {
|
|
@@ -1024,12 +1024,12 @@
|
|
|
1024
1024
|
}
|
|
1025
1025
|
function BT709TransferFunctions() {
|
|
1026
1026
|
BT709TransferFunctions_instance = this;
|
|
1027
|
-
this.
|
|
1027
|
+
this.q2w_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1028
1028
|
}
|
|
1029
|
-
protoOf(BT709TransferFunctions).s2u = function (x) {
|
|
1030
|
-
return numberToDouble(x < this.p2w_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
1031
|
-
};
|
|
1032
1029
|
protoOf(BT709TransferFunctions).t2u = function (x) {
|
|
1030
|
+
return numberToDouble(x < this.q2w_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
1031
|
+
};
|
|
1032
|
+
protoOf(BT709TransferFunctions).u2u = function (x) {
|
|
1033
1033
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1034
1034
|
};
|
|
1035
1035
|
var BT709TransferFunctions_instance;
|
|
@@ -1041,10 +1041,10 @@
|
|
|
1041
1041
|
function SRGBTransferFunctions() {
|
|
1042
1042
|
SRGBTransferFunctions_instance = this;
|
|
1043
1043
|
}
|
|
1044
|
-
protoOf(SRGBTransferFunctions).
|
|
1044
|
+
protoOf(SRGBTransferFunctions).u2u = function (x) {
|
|
1045
1045
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
1046
1046
|
};
|
|
1047
|
-
protoOf(SRGBTransferFunctions).
|
|
1047
|
+
protoOf(SRGBTransferFunctions).t2u = function (x) {
|
|
1048
1048
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1049
1049
|
};
|
|
1050
1050
|
var SRGBTransferFunctions_instance;
|
|
@@ -1055,12 +1055,12 @@
|
|
|
1055
1055
|
}
|
|
1056
1056
|
function ROMMTransferFunctions() {
|
|
1057
1057
|
ROMMTransferFunctions_instance = this;
|
|
1058
|
-
this.
|
|
1058
|
+
this.r2w_1 = 0.001953;
|
|
1059
1059
|
}
|
|
1060
|
-
protoOf(ROMMTransferFunctions).
|
|
1060
|
+
protoOf(ROMMTransferFunctions).t2u = function (x) {
|
|
1061
1061
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
1062
1062
|
};
|
|
1063
|
-
protoOf(ROMMTransferFunctions).
|
|
1063
|
+
protoOf(ROMMTransferFunctions).u2u = function (x) {
|
|
1064
1064
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
1065
1065
|
};
|
|
1066
1066
|
var ROMMTransferFunctions_instance;
|
|
@@ -1071,13 +1071,13 @@
|
|
|
1071
1071
|
}
|
|
1072
1072
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1073
1073
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1074
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1075
|
-
var wp = whitePoint.
|
|
1074
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.s2w_1, g.s2w_1, b.s2w_1, r.t2w_1, g.t2w_1, b.t2w_1, r.v2w(), g.v2w(), b.v2w());
|
|
1075
|
+
var wp = whitePoint.i2t_1;
|
|
1076
1076
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1077
1077
|
var tmp0_dot = inverse(primaries);
|
|
1078
|
-
var tmp1_dot = wp.
|
|
1079
|
-
var tmp2_dot = wp.
|
|
1080
|
-
var tmp3_dot = wp.
|
|
1078
|
+
var tmp1_dot = wp.w2w();
|
|
1079
|
+
var tmp2_dot = wp.u2w_1;
|
|
1080
|
+
var tmp3_dot = wp.x2w();
|
|
1081
1081
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1082
1082
|
var tmp4_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
1083
1083
|
var tmp5_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
@@ -1085,41 +1085,41 @@
|
|
|
1085
1085
|
return dotDiagonal(primaries, tmp4_anonymous, tmp5_anonymous, tmp6_anonymous);
|
|
1086
1086
|
}
|
|
1087
1087
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
|
|
1088
|
-
this.
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
1093
|
-
this.
|
|
1094
|
-
this.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
}
|
|
1098
|
-
protoOf(RGBColorSpaceImpl).
|
|
1099
|
-
return this.y2w_1;
|
|
1100
|
-
};
|
|
1101
|
-
protoOf(RGBColorSpaceImpl).w2u = function () {
|
|
1088
|
+
this.y2w_1 = name;
|
|
1089
|
+
this.z2w_1 = whitePoint;
|
|
1090
|
+
this.a2x_1 = transferFunctions;
|
|
1091
|
+
this.b2x_1 = r;
|
|
1092
|
+
this.c2x_1 = g;
|
|
1093
|
+
this.d2x_1 = b;
|
|
1094
|
+
this.e2x_1 = rectangularComponentInfo('RGB');
|
|
1095
|
+
this.f2x_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.z2w_1, this.b2x_1, this.c2x_1, this.d2x_1));
|
|
1096
|
+
this.g2x_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.f2x_1)));
|
|
1097
|
+
}
|
|
1098
|
+
protoOf(RGBColorSpaceImpl).a2v = function () {
|
|
1102
1099
|
return this.z2w_1;
|
|
1103
1100
|
};
|
|
1104
1101
|
protoOf(RGBColorSpaceImpl).x2u = function () {
|
|
1105
|
-
return this.
|
|
1102
|
+
return this.a2x_1;
|
|
1106
1103
|
};
|
|
1107
1104
|
protoOf(RGBColorSpaceImpl).y2u = function () {
|
|
1108
1105
|
return this.f2x_1;
|
|
1109
1106
|
};
|
|
1107
|
+
protoOf(RGBColorSpaceImpl).z2u = function () {
|
|
1108
|
+
return this.g2x_1;
|
|
1109
|
+
};
|
|
1110
1110
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1111
|
-
return this.
|
|
1111
|
+
return this.y2w_1;
|
|
1112
1112
|
};
|
|
1113
|
-
protoOf(RGBColorSpaceImpl).
|
|
1113
|
+
protoOf(RGBColorSpaceImpl).l2u = function (r, g, b, alpha) {
|
|
1114
1114
|
return new RGB(r, g, b, alpha, this);
|
|
1115
1115
|
};
|
|
1116
1116
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1117
|
-
var result = getStringHashCode(this.
|
|
1118
|
-
result = imul(result, 31) + this.
|
|
1119
|
-
result = imul(result, 31) + hashCode(this.
|
|
1120
|
-
result = imul(result, 31) + this.a2x_1.hashCode() | 0;
|
|
1117
|
+
var result = getStringHashCode(this.y2w_1);
|
|
1118
|
+
result = imul(result, 31) + this.z2w_1.hashCode() | 0;
|
|
1119
|
+
result = imul(result, 31) + hashCode(this.a2x_1) | 0;
|
|
1121
1120
|
result = imul(result, 31) + this.b2x_1.hashCode() | 0;
|
|
1122
1121
|
result = imul(result, 31) + this.c2x_1.hashCode() | 0;
|
|
1122
|
+
result = imul(result, 31) + this.d2x_1.hashCode() | 0;
|
|
1123
1123
|
return result;
|
|
1124
1124
|
};
|
|
1125
1125
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1128,32 +1128,32 @@
|
|
|
1128
1128
|
if (!(other instanceof RGBColorSpaceImpl))
|
|
1129
1129
|
return false;
|
|
1130
1130
|
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
1131
|
-
if (!(this.
|
|
1131
|
+
if (!(this.y2w_1 === tmp0_other_with_cast.y2w_1))
|
|
1132
1132
|
return false;
|
|
1133
|
-
if (!this.
|
|
1133
|
+
if (!this.z2w_1.equals(tmp0_other_with_cast.z2w_1))
|
|
1134
1134
|
return false;
|
|
1135
|
-
if (!equals(this.
|
|
1136
|
-
return false;
|
|
1137
|
-
if (!this.a2x_1.equals(tmp0_other_with_cast.a2x_1))
|
|
1135
|
+
if (!equals(this.a2x_1, tmp0_other_with_cast.a2x_1))
|
|
1138
1136
|
return false;
|
|
1139
1137
|
if (!this.b2x_1.equals(tmp0_other_with_cast.b2x_1))
|
|
1140
1138
|
return false;
|
|
1141
1139
|
if (!this.c2x_1.equals(tmp0_other_with_cast.c2x_1))
|
|
1142
1140
|
return false;
|
|
1141
|
+
if (!this.d2x_1.equals(tmp0_other_with_cast.d2x_1))
|
|
1142
|
+
return false;
|
|
1143
1143
|
return true;
|
|
1144
1144
|
};
|
|
1145
1145
|
function BT2020TransferFunctions() {
|
|
1146
1146
|
BT2020TransferFunctions_instance = this;
|
|
1147
|
-
this.
|
|
1148
|
-
this.
|
|
1147
|
+
this.h2x_1 = 1.0993;
|
|
1148
|
+
this.i2x_1 = 0.0181;
|
|
1149
1149
|
var tmp = this;
|
|
1150
1150
|
// Inline function 'kotlin.math.pow' call
|
|
1151
|
-
tmp.
|
|
1151
|
+
tmp.j2x_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
|
|
1152
1152
|
}
|
|
1153
|
-
protoOf(BT2020TransferFunctions).s2u = function (x) {
|
|
1154
|
-
return numberToDouble(x < this.i2x_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
1155
|
-
};
|
|
1156
1153
|
protoOf(BT2020TransferFunctions).t2u = function (x) {
|
|
1154
|
+
return numberToDouble(x < this.j2x_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
1155
|
+
};
|
|
1156
|
+
protoOf(BT2020TransferFunctions).u2u = function (x) {
|
|
1157
1157
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
1158
1158
|
};
|
|
1159
1159
|
var BT2020TransferFunctions_instance;
|
|
@@ -1180,13 +1180,13 @@
|
|
|
1180
1180
|
}
|
|
1181
1181
|
function Companion_3() {
|
|
1182
1182
|
Companion_instance_3 = this;
|
|
1183
|
-
this.
|
|
1183
|
+
this.k2x_1 = XYZColorSpaces_getInstance().l2x_1;
|
|
1184
1184
|
}
|
|
1185
|
-
protoOf(Companion_3).
|
|
1186
|
-
return this.
|
|
1185
|
+
protoOf(Companion_3).a2v = function () {
|
|
1186
|
+
return this.k2x_1.a2v();
|
|
1187
1187
|
};
|
|
1188
|
-
protoOf(Companion_3).
|
|
1189
|
-
return this.
|
|
1188
|
+
protoOf(Companion_3).l2u = function (x, y, z, alpha) {
|
|
1189
|
+
return this.k2x_1.l2u(x, y, z, alpha);
|
|
1190
1190
|
};
|
|
1191
1191
|
var Companion_instance_3;
|
|
1192
1192
|
function Companion_getInstance_3() {
|
|
@@ -1195,65 +1195,65 @@
|
|
|
1195
1195
|
return Companion_instance_3;
|
|
1196
1196
|
}
|
|
1197
1197
|
function adaptToM($this, space, m, mi) {
|
|
1198
|
-
if (space.
|
|
1198
|
+
if (space.a2v().equals($this.w2v_1.a2v()))
|
|
1199
1199
|
return $this;
|
|
1200
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1200
|
+
var transform = chromaticAdaptationMatrix(space, $this.w2v_1.a2v().i2t_1, m, mi);
|
|
1201
1201
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1202
|
-
var tmp0_dot = $this.
|
|
1203
|
-
var tmp1_dot = $this.
|
|
1204
|
-
var tmp2_dot = $this.
|
|
1202
|
+
var tmp0_dot = $this.s2v_1;
|
|
1203
|
+
var tmp1_dot = $this.t2v_1;
|
|
1204
|
+
var tmp2_dot = $this.u2v_1;
|
|
1205
1205
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1206
1206
|
var tmp3_anonymous = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 0) * tmp2_dot;
|
|
1207
1207
|
var tmp4_anonymous = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 1) * tmp2_dot;
|
|
1208
1208
|
var tmp5_anonymous = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 2) * tmp2_dot;
|
|
1209
|
-
return space.
|
|
1209
|
+
return space.l2u(tmp3_anonymous, tmp4_anonymous, tmp5_anonymous, $this.v2v_1);
|
|
1210
1210
|
}
|
|
1211
1211
|
function XYZ(x, y, z, alpha, space) {
|
|
1212
1212
|
Companion_getInstance_3();
|
|
1213
|
-
this.
|
|
1214
|
-
this.
|
|
1215
|
-
this.
|
|
1216
|
-
this.
|
|
1217
|
-
this.
|
|
1213
|
+
this.s2v_1 = x;
|
|
1214
|
+
this.t2v_1 = y;
|
|
1215
|
+
this.u2v_1 = z;
|
|
1216
|
+
this.v2v_1 = alpha;
|
|
1217
|
+
this.w2v_1 = space;
|
|
1218
1218
|
}
|
|
1219
|
-
protoOf(XYZ).
|
|
1219
|
+
protoOf(XYZ).n2x = function (space) {
|
|
1220
1220
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1221
1221
|
};
|
|
1222
|
-
protoOf(XYZ).
|
|
1223
|
-
var tmp0_container = this.
|
|
1222
|
+
protoOf(XYZ).x2v = function (space) {
|
|
1223
|
+
var tmp0_container = this.n2x(XYZColorSpace(space.a2v()));
|
|
1224
1224
|
var x = tmp0_container.fd();
|
|
1225
1225
|
var y = tmp0_container.gd();
|
|
1226
1226
|
var z = tmp0_container.zg();
|
|
1227
|
-
var f = space.
|
|
1227
|
+
var f = space.x2u();
|
|
1228
1228
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1229
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.
|
|
1229
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.z2u());
|
|
1230
1230
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1231
1231
|
var tmp1_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * z;
|
|
1232
1232
|
var tmp2_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * z;
|
|
1233
1233
|
var tmp3_anonymous = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * z;
|
|
1234
|
-
return space.
|
|
1234
|
+
return space.l2u(f.u2u(tmp1_anonymous), f.u2u(tmp2_anonymous), f.u2u(tmp3_anonymous), this.v2v_1);
|
|
1235
1235
|
};
|
|
1236
|
-
protoOf(XYZ).
|
|
1237
|
-
return this.
|
|
1236
|
+
protoOf(XYZ).t2t = function () {
|
|
1237
|
+
return this.x2v(RGBColorSpaces_getInstance().b2v_1);
|
|
1238
1238
|
};
|
|
1239
1239
|
protoOf(XYZ).fd = function () {
|
|
1240
|
-
return this.
|
|
1240
|
+
return this.s2v_1;
|
|
1241
1241
|
};
|
|
1242
1242
|
protoOf(XYZ).gd = function () {
|
|
1243
|
-
return this.
|
|
1243
|
+
return this.t2v_1;
|
|
1244
1244
|
};
|
|
1245
1245
|
protoOf(XYZ).zg = function () {
|
|
1246
|
-
return this.
|
|
1246
|
+
return this.u2v_1;
|
|
1247
1247
|
};
|
|
1248
1248
|
protoOf(XYZ).toString = function () {
|
|
1249
|
-
return 'XYZ(x=' + this.
|
|
1249
|
+
return 'XYZ(x=' + this.s2v_1 + ', y=' + this.t2v_1 + ', z=' + this.u2v_1 + ', alpha=' + this.v2v_1 + ', space=' + this.w2v_1 + ')';
|
|
1250
1250
|
};
|
|
1251
1251
|
protoOf(XYZ).hashCode = function () {
|
|
1252
|
-
var result = getNumberHashCode(this.
|
|
1253
|
-
result = imul(result, 31) + getNumberHashCode(this.s2v_1) | 0;
|
|
1252
|
+
var result = getNumberHashCode(this.s2v_1);
|
|
1254
1253
|
result = imul(result, 31) + getNumberHashCode(this.t2v_1) | 0;
|
|
1255
1254
|
result = imul(result, 31) + getNumberHashCode(this.u2v_1) | 0;
|
|
1256
|
-
result = imul(result, 31) +
|
|
1255
|
+
result = imul(result, 31) + getNumberHashCode(this.v2v_1) | 0;
|
|
1256
|
+
result = imul(result, 31) + hashCode(this.w2v_1) | 0;
|
|
1257
1257
|
return result;
|
|
1258
1258
|
};
|
|
1259
1259
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -1262,8 +1262,6 @@
|
|
|
1262
1262
|
if (!(other instanceof XYZ))
|
|
1263
1263
|
return false;
|
|
1264
1264
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1265
|
-
if (!equals(this.r2v_1, tmp0_other_with_cast.r2v_1))
|
|
1266
|
-
return false;
|
|
1267
1265
|
if (!equals(this.s2v_1, tmp0_other_with_cast.s2v_1))
|
|
1268
1266
|
return false;
|
|
1269
1267
|
if (!equals(this.t2v_1, tmp0_other_with_cast.t2v_1))
|
|
@@ -1272,15 +1270,17 @@
|
|
|
1272
1270
|
return false;
|
|
1273
1271
|
if (!equals(this.v2v_1, tmp0_other_with_cast.v2v_1))
|
|
1274
1272
|
return false;
|
|
1273
|
+
if (!equals(this.w2v_1, tmp0_other_with_cast.w2v_1))
|
|
1274
|
+
return false;
|
|
1275
1275
|
return true;
|
|
1276
1276
|
};
|
|
1277
1277
|
function XYZColorSpace(whitePoint) {
|
|
1278
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1278
|
+
return whitePoint.equals(Illuminant_getInstance().o2t_1) ? XYZColorSpaces_getInstance().l2x_1 : whitePoint.equals(Illuminant_getInstance().m2t_1) ? XYZColorSpaces_getInstance().m2x_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1279
1279
|
}
|
|
1280
1280
|
function XYZColorSpaces() {
|
|
1281
1281
|
XYZColorSpaces_instance = this;
|
|
1282
|
-
this.
|
|
1283
|
-
this.
|
|
1282
|
+
this.l2x_1 = new XYZColorSpaceImpl(Illuminant_getInstance().o2t_1);
|
|
1283
|
+
this.m2x_1 = new XYZColorSpaceImpl(Illuminant_getInstance().m2t_1);
|
|
1284
1284
|
}
|
|
1285
1285
|
var XYZColorSpaces_instance;
|
|
1286
1286
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1291,26 +1291,26 @@
|
|
|
1291
1291
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1292
1292
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1293
1293
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1294
|
-
var dstWp = _this__u8e3s4.
|
|
1295
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
1296
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
1294
|
+
var dstWp = _this__u8e3s4.a2v().i2t_1;
|
|
1295
|
+
var src = dot_0(xyzToLms, srcWp.w2w(), srcWp.u2w_1, srcWp.x2w());
|
|
1296
|
+
var dst = dot_0(xyzToLms, dstWp.w2w(), dstWp.u2w_1, dstWp.x2w());
|
|
1297
1297
|
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);
|
|
1298
1298
|
}
|
|
1299
1299
|
function XYZColorSpaceImpl(whitePoint) {
|
|
1300
|
-
this.
|
|
1301
|
-
this.
|
|
1300
|
+
this.o2x_1 = whitePoint;
|
|
1301
|
+
this.p2x_1 = rectangularComponentInfo('XYZ');
|
|
1302
1302
|
}
|
|
1303
|
-
protoOf(XYZColorSpaceImpl).
|
|
1304
|
-
return this.
|
|
1303
|
+
protoOf(XYZColorSpaceImpl).a2v = function () {
|
|
1304
|
+
return this.o2x_1;
|
|
1305
1305
|
};
|
|
1306
1306
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1307
|
-
return 'XYZColorSpace(' + this.
|
|
1307
|
+
return 'XYZColorSpace(' + this.o2x_1 + ')';
|
|
1308
1308
|
};
|
|
1309
|
-
protoOf(XYZColorSpaceImpl).
|
|
1309
|
+
protoOf(XYZColorSpaceImpl).l2u = function (x, y, z, alpha) {
|
|
1310
1310
|
return new XYZ(x, y, z, alpha, this);
|
|
1311
1311
|
};
|
|
1312
1312
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1313
|
-
return this.
|
|
1313
|
+
return this.o2x_1.hashCode();
|
|
1314
1314
|
};
|
|
1315
1315
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1316
1316
|
if (this === other)
|
|
@@ -1318,7 +1318,7 @@
|
|
|
1318
1318
|
if (!(other instanceof XYZColorSpaceImpl))
|
|
1319
1319
|
return false;
|
|
1320
1320
|
var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
|
|
1321
|
-
if (!this.
|
|
1321
|
+
if (!this.o2x_1.equals(tmp0_other_with_cast.o2x_1))
|
|
1322
1322
|
return false;
|
|
1323
1323
|
return true;
|
|
1324
1324
|
};
|
|
@@ -1332,26 +1332,26 @@
|
|
|
1332
1332
|
}
|
|
1333
1333
|
function xyY(x, y, Y) {
|
|
1334
1334
|
Y = Y === VOID ? 1.0 : Y;
|
|
1335
|
-
this.
|
|
1336
|
-
this.
|
|
1337
|
-
this.
|
|
1335
|
+
this.s2w_1 = x;
|
|
1336
|
+
this.t2w_1 = y;
|
|
1337
|
+
this.u2w_1 = Y;
|
|
1338
1338
|
}
|
|
1339
|
-
protoOf(xyY).u2w = function () {
|
|
1340
|
-
return 1 - this.r2w_1 - this.s2w_1;
|
|
1341
|
-
};
|
|
1342
1339
|
protoOf(xyY).v2w = function () {
|
|
1343
|
-
return
|
|
1340
|
+
return 1 - this.s2w_1 - this.t2w_1;
|
|
1344
1341
|
};
|
|
1345
1342
|
protoOf(xyY).w2w = function () {
|
|
1346
|
-
return
|
|
1343
|
+
return this.s2w_1 * this.u2w_1 / this.t2w_1;
|
|
1344
|
+
};
|
|
1345
|
+
protoOf(xyY).x2w = function () {
|
|
1346
|
+
return (1 - this.s2w_1 - this.t2w_1) * this.u2w_1 / this.t2w_1;
|
|
1347
1347
|
};
|
|
1348
1348
|
protoOf(xyY).toString = function () {
|
|
1349
|
-
return 'xyY(x=' + this.
|
|
1349
|
+
return 'xyY(x=' + this.s2w_1 + ', y=' + this.t2w_1 + ', Y=' + this.u2w_1 + ')';
|
|
1350
1350
|
};
|
|
1351
1351
|
protoOf(xyY).hashCode = function () {
|
|
1352
|
-
var result = getNumberHashCode(this.
|
|
1353
|
-
result = imul(result, 31) + getNumberHashCode(this.s2w_1) | 0;
|
|
1352
|
+
var result = getNumberHashCode(this.s2w_1);
|
|
1354
1353
|
result = imul(result, 31) + getNumberHashCode(this.t2w_1) | 0;
|
|
1354
|
+
result = imul(result, 31) + getNumberHashCode(this.u2w_1) | 0;
|
|
1355
1355
|
return result;
|
|
1356
1356
|
};
|
|
1357
1357
|
protoOf(xyY).equals = function (other) {
|
|
@@ -1360,36 +1360,36 @@
|
|
|
1360
1360
|
if (!(other instanceof xyY))
|
|
1361
1361
|
return false;
|
|
1362
1362
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1363
|
-
if (!equals(this.r2w_1, tmp0_other_with_cast.r2w_1))
|
|
1364
|
-
return false;
|
|
1365
1363
|
if (!equals(this.s2w_1, tmp0_other_with_cast.s2w_1))
|
|
1366
1364
|
return false;
|
|
1367
1365
|
if (!equals(this.t2w_1, tmp0_other_with_cast.t2w_1))
|
|
1368
1366
|
return false;
|
|
1367
|
+
if (!equals(this.u2w_1, tmp0_other_with_cast.u2w_1))
|
|
1368
|
+
return false;
|
|
1369
1369
|
return true;
|
|
1370
1370
|
};
|
|
1371
1371
|
//region block: post-declaration
|
|
1372
|
-
protoOf(Companion_2).
|
|
1373
|
-
protoOf(Companion_2).
|
|
1374
|
-
protoOf(Companion_2).
|
|
1375
|
-
protoOf(SRGB).
|
|
1376
|
-
protoOf(SRGB).
|
|
1377
|
-
protoOf(SRGB).
|
|
1378
|
-
protoOf(SRGB).
|
|
1379
|
-
protoOf(SRGB).
|
|
1380
|
-
protoOf(SRGB).
|
|
1381
|
-
protoOf(BT2020Space).
|
|
1382
|
-
protoOf(BT2020Space).
|
|
1383
|
-
protoOf(BT2020Space).
|
|
1384
|
-
protoOf(BT2020Space).
|
|
1385
|
-
protoOf(BT2020Space).
|
|
1386
|
-
protoOf(BT2020Space).
|
|
1387
|
-
protoOf(RGBColorSpaceImpl).
|
|
1388
|
-
protoOf(RGBColorSpaceImpl).
|
|
1389
|
-
protoOf(RGBColorSpaceImpl).
|
|
1390
|
-
protoOf(RGBColorSpaceImpl).
|
|
1391
|
-
protoOf(RGBColorSpaceImpl).
|
|
1392
|
-
protoOf(RGBColorSpaceImpl).
|
|
1372
|
+
protoOf(Companion_2).v2t = from255$default;
|
|
1373
|
+
protoOf(Companion_2).u2t = invoke$default;
|
|
1374
|
+
protoOf(Companion_2).z2t = invoke$default_0;
|
|
1375
|
+
protoOf(SRGB).u2t = invoke$default;
|
|
1376
|
+
protoOf(SRGB).v2u = invoke;
|
|
1377
|
+
protoOf(SRGB).z2t = invoke$default_0;
|
|
1378
|
+
protoOf(SRGB).o1z = invoke_0;
|
|
1379
|
+
protoOf(SRGB).w2u = from255;
|
|
1380
|
+
protoOf(SRGB).v2t = from255$default;
|
|
1381
|
+
protoOf(BT2020Space).u2t = invoke$default;
|
|
1382
|
+
protoOf(BT2020Space).v2u = invoke;
|
|
1383
|
+
protoOf(BT2020Space).z2t = invoke$default_0;
|
|
1384
|
+
protoOf(BT2020Space).o1z = invoke_0;
|
|
1385
|
+
protoOf(BT2020Space).w2u = from255;
|
|
1386
|
+
protoOf(BT2020Space).v2t = from255$default;
|
|
1387
|
+
protoOf(RGBColorSpaceImpl).u2t = invoke$default;
|
|
1388
|
+
protoOf(RGBColorSpaceImpl).v2u = invoke;
|
|
1389
|
+
protoOf(RGBColorSpaceImpl).z2t = invoke$default_0;
|
|
1390
|
+
protoOf(RGBColorSpaceImpl).o1z = invoke_0;
|
|
1391
|
+
protoOf(RGBColorSpaceImpl).w2u = from255;
|
|
1392
|
+
protoOf(RGBColorSpaceImpl).v2t = from255$default;
|
|
1393
1393
|
//endregion
|
|
1394
1394
|
//region block: exports
|
|
1395
1395
|
_.$_$ = _.$_$ || {};
|