@flock/wirespec 0.9.20 → 0.9.21
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/arrow-arrow-core.js +17 -3
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +1122 -1122
- package/colormath-root-colormath.js +331 -331
- package/kotlin-kotlin-stdlib.js +11 -11
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-rgxgen.js +1760 -1760
- package/markdown.js +1766 -1766
- package/mordant-mordant.js +1483 -1483
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +17 -10
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +108 -165
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +1002 -853
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-cli.js +85 -85
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +0 -7
- package/wirespec-src-plugin-npm.js +62 -41
- package/wirespec-src-plugin-npm.js.map +1 -1
- package/wirespec-src-tools-generator.js +14 -14
- package/wirespec-src-tools-generator.js.map +1 -1
|
@@ -67,21 +67,21 @@
|
|
|
67
67
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
68
68
|
function invoke$default(r, g, b, alpha, $super) {
|
|
69
69
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
70
|
-
return $super === VOID ? this.
|
|
70
|
+
return $super === VOID ? this.e34(r, g, b, alpha) : $super.e34.call(this, r, g, b, alpha);
|
|
71
71
|
}
|
|
72
72
|
function invoke(r, g, b, alpha) {
|
|
73
|
-
return this.
|
|
73
|
+
return this.e34(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
74
74
|
}
|
|
75
75
|
function invoke$default_0(r, g, b, alpha, $super) {
|
|
76
76
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
77
|
-
return $super === VOID ? this.
|
|
77
|
+
return $super === VOID ? this.o34(r, g, b, alpha) : invoke(r, g, b, alpha);
|
|
78
78
|
}
|
|
79
79
|
function from255(r, g, b, alpha) {
|
|
80
|
-
return this.
|
|
80
|
+
return this.e34(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
81
81
|
}
|
|
82
82
|
function from255$default(r, g, b, alpha, $super) {
|
|
83
83
|
alpha = alpha === VOID ? 255 : alpha;
|
|
84
|
-
return $super === VOID ? this.
|
|
84
|
+
return $super === VOID ? this.p34(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
85
85
|
}
|
|
86
86
|
function invoke_0(hex) {
|
|
87
87
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
} else {
|
|
98
98
|
tmp_2 = 255;
|
|
99
99
|
}
|
|
100
|
-
return this.
|
|
100
|
+
return this.p34(tmp, tmp_0, tmp_1, tmp_2);
|
|
101
101
|
}
|
|
102
102
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta);
|
|
103
103
|
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
@@ -119,19 +119,19 @@
|
|
|
119
119
|
setMetadataFor(xyY, 'xyY', classMeta);
|
|
120
120
|
//endregion
|
|
121
121
|
function ColorComponentInfo(name, isPolar) {
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
122
|
+
this.y32_1 = name;
|
|
123
|
+
this.z32_1 = isPolar;
|
|
124
124
|
}
|
|
125
125
|
function WhitePoint(name, chromaticity) {
|
|
126
|
-
this.
|
|
127
|
-
this.
|
|
126
|
+
this.a33_1 = name;
|
|
127
|
+
this.b33_1 = chromaticity;
|
|
128
128
|
}
|
|
129
129
|
protoOf(WhitePoint).toString = function () {
|
|
130
|
-
return this.
|
|
130
|
+
return this.a33_1;
|
|
131
131
|
};
|
|
132
132
|
protoOf(WhitePoint).hashCode = function () {
|
|
133
|
-
var result = getStringHashCode(this.
|
|
134
|
-
result = imul(result, 31) + this.
|
|
133
|
+
var result = getStringHashCode(this.a33_1);
|
|
134
|
+
result = imul(result, 31) + this.b33_1.hashCode() | 0;
|
|
135
135
|
return result;
|
|
136
136
|
};
|
|
137
137
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -140,22 +140,22 @@
|
|
|
140
140
|
if (!(other instanceof WhitePoint))
|
|
141
141
|
return false;
|
|
142
142
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
143
|
-
if (!(this.
|
|
143
|
+
if (!(this.a33_1 === tmp0_other_with_cast.a33_1))
|
|
144
144
|
return false;
|
|
145
|
-
if (!this.
|
|
145
|
+
if (!this.b33_1.equals(tmp0_other_with_cast.b33_1))
|
|
146
146
|
return false;
|
|
147
147
|
return true;
|
|
148
148
|
};
|
|
149
149
|
function Illuminant() {
|
|
150
150
|
Illuminant_instance = this;
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
155
|
-
this.
|
|
156
|
-
this.
|
|
157
|
-
this.
|
|
158
|
-
this.
|
|
151
|
+
this.c33_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
152
|
+
this.d33_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
153
|
+
this.e33_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
154
|
+
this.f33_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
155
|
+
this.g33_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
156
|
+
this.h33_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
157
|
+
this.i33_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
158
|
+
this.j33_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
159
159
|
}
|
|
160
160
|
var Illuminant_instance;
|
|
161
161
|
function Illuminant_getInstance() {
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
}
|
|
333
333
|
function Companion() {
|
|
334
334
|
Companion_instance = this;
|
|
335
|
-
this.
|
|
335
|
+
this.k33_1 = componentInfoList([new ColorComponentInfo('code', false)]);
|
|
336
336
|
}
|
|
337
337
|
var Companion_instance;
|
|
338
338
|
function Companion_getInstance() {
|
|
@@ -342,35 +342,35 @@
|
|
|
342
342
|
}
|
|
343
343
|
function Ansi16(code) {
|
|
344
344
|
Companion_getInstance();
|
|
345
|
-
this.
|
|
345
|
+
this.l33_1 = code;
|
|
346
346
|
}
|
|
347
|
-
protoOf(Ansi16).
|
|
348
|
-
switch (this.
|
|
347
|
+
protoOf(Ansi16).m33 = function () {
|
|
348
|
+
switch (this.l33_1) {
|
|
349
349
|
case 30:
|
|
350
350
|
case 40:
|
|
351
|
-
return Companion_getInstance_2().
|
|
351
|
+
return Companion_getInstance_2().n33(0.0, 0.0, 0.0);
|
|
352
352
|
case 90:
|
|
353
353
|
case 100:
|
|
354
|
-
return Companion_getInstance_2().
|
|
354
|
+
return Companion_getInstance_2().o33(128, 128, 128);
|
|
355
355
|
case 37:
|
|
356
356
|
case 47:
|
|
357
|
-
return Companion_getInstance_2().
|
|
357
|
+
return Companion_getInstance_2().o33(192, 192, 192);
|
|
358
358
|
case 97:
|
|
359
359
|
case 107:
|
|
360
|
-
return Companion_getInstance_2().
|
|
360
|
+
return Companion_getInstance_2().n33(1.0, 1.0, 1.0);
|
|
361
361
|
}
|
|
362
|
-
var color = this.
|
|
363
|
-
var mul = this.
|
|
362
|
+
var color = this.l33_1 % 10 | 0;
|
|
363
|
+
var mul = this.l33_1 > 50 ? 1.0 : 0.5;
|
|
364
364
|
var r = (color % 2 | 0) * mul;
|
|
365
365
|
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
366
366
|
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
367
|
-
return Companion_getInstance_2().
|
|
367
|
+
return Companion_getInstance_2().n33(r, g, b);
|
|
368
368
|
};
|
|
369
369
|
protoOf(Ansi16).toString = function () {
|
|
370
|
-
return 'Ansi16(code=' + this.
|
|
370
|
+
return 'Ansi16(code=' + this.l33_1 + ')';
|
|
371
371
|
};
|
|
372
372
|
protoOf(Ansi16).hashCode = function () {
|
|
373
|
-
return this.
|
|
373
|
+
return this.l33_1;
|
|
374
374
|
};
|
|
375
375
|
protoOf(Ansi16).equals = function (other) {
|
|
376
376
|
if (this === other)
|
|
@@ -378,13 +378,13 @@
|
|
|
378
378
|
if (!(other instanceof Ansi16))
|
|
379
379
|
return false;
|
|
380
380
|
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
381
|
-
if (!(this.
|
|
381
|
+
if (!(this.l33_1 === tmp0_other_with_cast.l33_1))
|
|
382
382
|
return false;
|
|
383
383
|
return true;
|
|
384
384
|
};
|
|
385
385
|
function Companion_0() {
|
|
386
386
|
Companion_instance_0 = this;
|
|
387
|
-
this.
|
|
387
|
+
this.p33_1 = componentInfoList([new ColorComponentInfo('code', false)]);
|
|
388
388
|
}
|
|
389
389
|
var Companion_instance_0;
|
|
390
390
|
function Companion_getInstance_0() {
|
|
@@ -394,16 +394,16 @@
|
|
|
394
394
|
}
|
|
395
395
|
function Ansi256(code) {
|
|
396
396
|
Companion_getInstance_0();
|
|
397
|
-
this.
|
|
398
|
-
}
|
|
399
|
-
protoOf(Ansi256).
|
|
400
|
-
if (this.
|
|
401
|
-
return this.
|
|
402
|
-
if (this.
|
|
403
|
-
var c = imul(this.
|
|
404
|
-
return Companion_getInstance_2().
|
|
397
|
+
this.q33_1 = code;
|
|
398
|
+
}
|
|
399
|
+
protoOf(Ansi256).m33 = function () {
|
|
400
|
+
if (this.q33_1 < 16)
|
|
401
|
+
return this.r33().m33();
|
|
402
|
+
if (this.q33_1 >= 232) {
|
|
403
|
+
var c = imul(this.q33_1 - 232 | 0, 10) + 8 | 0;
|
|
404
|
+
return Companion_getInstance_2().o33(c, c, c);
|
|
405
405
|
}
|
|
406
|
-
var c_0 = this.
|
|
406
|
+
var c_0 = this.q33_1 - 16 | 0;
|
|
407
407
|
var rem = c_0 % 36 | 0;
|
|
408
408
|
// Inline function 'kotlin.math.floor' call
|
|
409
409
|
var x = c_0 / 36.0;
|
|
@@ -412,16 +412,16 @@
|
|
|
412
412
|
var x_0 = rem / 6.0;
|
|
413
413
|
var g = Math.floor(x_0) / 5.0;
|
|
414
414
|
var b = (rem % 6 | 0) / 5.0;
|
|
415
|
-
return Companion_getInstance_2().
|
|
415
|
+
return Companion_getInstance_2().s33(r, g, b);
|
|
416
416
|
};
|
|
417
|
-
protoOf(Ansi256).
|
|
418
|
-
return this.
|
|
417
|
+
protoOf(Ansi256).r33 = function () {
|
|
418
|
+
return this.q33_1 < 8 ? new Ansi16(this.q33_1 + 30 | 0) : this.q33_1 < 16 ? new Ansi16((this.q33_1 - 8 | 0) + 90 | 0) : this.m33().r33();
|
|
419
419
|
};
|
|
420
420
|
protoOf(Ansi256).toString = function () {
|
|
421
|
-
return 'Ansi256(code=' + this.
|
|
421
|
+
return 'Ansi256(code=' + this.q33_1 + ')';
|
|
422
422
|
};
|
|
423
423
|
protoOf(Ansi256).hashCode = function () {
|
|
424
|
-
return this.
|
|
424
|
+
return this.q33_1;
|
|
425
425
|
};
|
|
426
426
|
protoOf(Ansi256).equals = function (other) {
|
|
427
427
|
if (this === other)
|
|
@@ -429,13 +429,13 @@
|
|
|
429
429
|
if (!(other instanceof Ansi256))
|
|
430
430
|
return false;
|
|
431
431
|
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
432
|
-
if (!(this.
|
|
432
|
+
if (!(this.q33_1 === tmp0_other_with_cast.q33_1))
|
|
433
433
|
return false;
|
|
434
434
|
return true;
|
|
435
435
|
};
|
|
436
436
|
function Companion_1() {
|
|
437
437
|
Companion_instance_1 = this;
|
|
438
|
-
this.
|
|
438
|
+
this.y33_1 = polarComponentInfo('HSV');
|
|
439
439
|
}
|
|
440
440
|
var Companion_instance_1;
|
|
441
441
|
function Companion_getInstance_1() {
|
|
@@ -454,27 +454,27 @@
|
|
|
454
454
|
function HSV(h, s, v, alpha) {
|
|
455
455
|
Companion_getInstance_1();
|
|
456
456
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
461
|
-
}
|
|
462
|
-
protoOf(HSV).
|
|
463
|
-
if (this.
|
|
464
|
-
return Companion_getInstance_2().
|
|
465
|
-
var v = this.
|
|
466
|
-
var h = normalizeDeg_0(this.
|
|
467
|
-
var s = this.
|
|
468
|
-
return SRGB_getInstance().
|
|
457
|
+
this.z33_1 = h;
|
|
458
|
+
this.a34_1 = s;
|
|
459
|
+
this.b34_1 = v;
|
|
460
|
+
this.c34_1 = alpha;
|
|
461
|
+
}
|
|
462
|
+
protoOf(HSV).m33 = function () {
|
|
463
|
+
if (this.a34_1 < 1.0E-7)
|
|
464
|
+
return Companion_getInstance_2().e34(this.b34_1, this.b34_1, this.b34_1, this.c34_1);
|
|
465
|
+
var v = this.b34_1;
|
|
466
|
+
var h = normalizeDeg_0(this.z33_1) / 60.0;
|
|
467
|
+
var s = this.a34_1;
|
|
468
|
+
return SRGB_getInstance().e34(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.c34_1);
|
|
469
469
|
};
|
|
470
470
|
protoOf(HSV).toString = function () {
|
|
471
|
-
return 'HSV(h=' + this.
|
|
471
|
+
return 'HSV(h=' + this.z33_1 + ', s=' + this.a34_1 + ', v=' + this.b34_1 + ', alpha=' + this.c34_1 + ')';
|
|
472
472
|
};
|
|
473
473
|
protoOf(HSV).hashCode = function () {
|
|
474
|
-
var result = getNumberHashCode(this.
|
|
474
|
+
var result = getNumberHashCode(this.z33_1);
|
|
475
|
+
result = imul(result, 31) + getNumberHashCode(this.a34_1) | 0;
|
|
475
476
|
result = imul(result, 31) + getNumberHashCode(this.b34_1) | 0;
|
|
476
477
|
result = imul(result, 31) + getNumberHashCode(this.c34_1) | 0;
|
|
477
|
-
result = imul(result, 31) + getNumberHashCode(this.d34_1) | 0;
|
|
478
478
|
return result;
|
|
479
479
|
};
|
|
480
480
|
protoOf(HSV).equals = function (other) {
|
|
@@ -483,30 +483,30 @@
|
|
|
483
483
|
if (!(other instanceof HSV))
|
|
484
484
|
return false;
|
|
485
485
|
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
486
|
+
if (!equals(this.z33_1, tmp0_other_with_cast.z33_1))
|
|
487
|
+
return false;
|
|
486
488
|
if (!equals(this.a34_1, tmp0_other_with_cast.a34_1))
|
|
487
489
|
return false;
|
|
488
490
|
if (!equals(this.b34_1, tmp0_other_with_cast.b34_1))
|
|
489
491
|
return false;
|
|
490
492
|
if (!equals(this.c34_1, tmp0_other_with_cast.c34_1))
|
|
491
493
|
return false;
|
|
492
|
-
if (!equals(this.d34_1, tmp0_other_with_cast.d34_1))
|
|
493
|
-
return false;
|
|
494
494
|
return true;
|
|
495
495
|
};
|
|
496
496
|
function GammaTransferFunctions(gamma) {
|
|
497
|
-
this.
|
|
497
|
+
this.l34_1 = gamma;
|
|
498
498
|
}
|
|
499
|
-
protoOf(GammaTransferFunctions).
|
|
500
|
-
return spow(x, this.
|
|
499
|
+
protoOf(GammaTransferFunctions).m34 = function (x) {
|
|
500
|
+
return spow(x, this.l34_1);
|
|
501
501
|
};
|
|
502
|
-
protoOf(GammaTransferFunctions).
|
|
503
|
-
return spow(x, 1.0 / this.
|
|
502
|
+
protoOf(GammaTransferFunctions).n34 = function (x) {
|
|
503
|
+
return spow(x, 1.0 / this.l34_1);
|
|
504
504
|
};
|
|
505
505
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
506
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
506
|
+
return 'GammaTransferFunctions(gamma=' + this.l34_1 + ')';
|
|
507
507
|
};
|
|
508
508
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
509
|
-
return getNumberHashCode(this.
|
|
509
|
+
return getNumberHashCode(this.l34_1);
|
|
510
510
|
};
|
|
511
511
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
512
512
|
if (this === other)
|
|
@@ -514,16 +514,16 @@
|
|
|
514
514
|
if (!(other instanceof GammaTransferFunctions))
|
|
515
515
|
return false;
|
|
516
516
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
517
|
-
if (!equals(this.
|
|
517
|
+
if (!equals(this.l34_1, tmp0_other_with_cast.l34_1))
|
|
518
518
|
return false;
|
|
519
519
|
return true;
|
|
520
520
|
};
|
|
521
521
|
function LinearTransferFunctions() {
|
|
522
522
|
}
|
|
523
|
-
protoOf(LinearTransferFunctions).
|
|
523
|
+
protoOf(LinearTransferFunctions).m34 = function (x) {
|
|
524
524
|
return x;
|
|
525
525
|
};
|
|
526
|
-
protoOf(LinearTransferFunctions).
|
|
526
|
+
protoOf(LinearTransferFunctions).n34 = function (x) {
|
|
527
527
|
return x;
|
|
528
528
|
};
|
|
529
529
|
var LinearTransferFunctions_instance;
|
|
@@ -534,31 +534,31 @@
|
|
|
534
534
|
}
|
|
535
535
|
function Companion_2() {
|
|
536
536
|
Companion_instance_2 = this;
|
|
537
|
-
this.
|
|
537
|
+
this.d34_1 = RGBColorSpaces_getInstance().u34_1;
|
|
538
538
|
}
|
|
539
|
-
protoOf(Companion_2).t34 = function () {
|
|
540
|
-
return this.e34_1.t34();
|
|
541
|
-
};
|
|
542
539
|
protoOf(Companion_2).s34 = function () {
|
|
543
|
-
return this.
|
|
540
|
+
return this.d34_1.s34();
|
|
544
541
|
};
|
|
545
542
|
protoOf(Companion_2).r34 = function () {
|
|
546
|
-
return this.
|
|
547
|
-
};
|
|
548
|
-
protoOf(Companion_2).u34 = function () {
|
|
549
|
-
return this.e34_1.u34();
|
|
543
|
+
return this.d34_1.r34();
|
|
550
544
|
};
|
|
551
|
-
protoOf(Companion_2).q34 = function (
|
|
552
|
-
return this.
|
|
545
|
+
protoOf(Companion_2).q34 = function () {
|
|
546
|
+
return this.d34_1.q34();
|
|
553
547
|
};
|
|
554
|
-
protoOf(Companion_2).
|
|
555
|
-
return this.
|
|
548
|
+
protoOf(Companion_2).t34 = function () {
|
|
549
|
+
return this.d34_1.t34();
|
|
556
550
|
};
|
|
557
551
|
protoOf(Companion_2).p34 = function (r, g, b, alpha) {
|
|
558
|
-
return this.
|
|
552
|
+
return this.d34_1.p34(r, g, b, alpha);
|
|
553
|
+
};
|
|
554
|
+
protoOf(Companion_2).e34 = function (r, g, b, alpha) {
|
|
555
|
+
return this.d34_1.e34(r, g, b, alpha);
|
|
556
|
+
};
|
|
557
|
+
protoOf(Companion_2).o34 = function (r, g, b, alpha) {
|
|
558
|
+
return this.d34_1.o34(r, g, b, alpha);
|
|
559
559
|
};
|
|
560
560
|
protoOf(Companion_2).w28 = function (hex) {
|
|
561
|
-
return this.
|
|
561
|
+
return this.d34_1.w28(hex);
|
|
562
562
|
};
|
|
563
563
|
var Companion_instance_2;
|
|
564
564
|
function Companion_getInstance_2() {
|
|
@@ -568,12 +568,17 @@
|
|
|
568
568
|
}
|
|
569
569
|
function RGB(r, g, b, alpha, space) {
|
|
570
570
|
Companion_getInstance_2();
|
|
571
|
-
this.
|
|
572
|
-
this.
|
|
573
|
-
this.
|
|
574
|
-
this.
|
|
575
|
-
this.
|
|
571
|
+
this.t33_1 = r;
|
|
572
|
+
this.u33_1 = g;
|
|
573
|
+
this.v33_1 = b;
|
|
574
|
+
this.w33_1 = alpha;
|
|
575
|
+
this.x33_1 = space;
|
|
576
576
|
}
|
|
577
|
+
protoOf(RGB).g35 = function () {
|
|
578
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
579
|
+
var this_0 = this.t33_1 * 255;
|
|
580
|
+
return roundToInt(this_0);
|
|
581
|
+
};
|
|
577
582
|
protoOf(RGB).h35 = function () {
|
|
578
583
|
// Inline function 'kotlin.math.roundToInt' call
|
|
579
584
|
var this_0 = this.u33_1 * 255;
|
|
@@ -584,27 +589,22 @@
|
|
|
584
589
|
var this_0 = this.v33_1 * 255;
|
|
585
590
|
return roundToInt(this_0);
|
|
586
591
|
};
|
|
587
|
-
protoOf(RGB).j35 = function () {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
return roundToInt(this_0);
|
|
591
|
-
};
|
|
592
|
-
protoOf(RGB).k35 = function (space) {
|
|
593
|
-
var f = SRGB_getInstance().j34_1;
|
|
594
|
-
return equals(this.y33_1, space) ? this : (equals(this.y33_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().w34_1) : false) ? space.f34(f.n34(this.u33_1), f.n34(this.v33_1), f.n34(this.w33_1), this.x33_1) : (equals(this.y33_1, RGBColorSpaces_getInstance().w34_1) ? equals(space, SRGB_getInstance()) : false) ? space.f34(f.o34(this.u33_1), f.o34(this.v33_1), f.o34(this.w33_1), this.x33_1) : this.l35().r35(space);
|
|
592
|
+
protoOf(RGB).j35 = function (space) {
|
|
593
|
+
var f = SRGB_getInstance().i34_1;
|
|
594
|
+
return equals(this.x33_1, space) ? this : (equals(this.x33_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().v34_1) : false) ? space.e34(f.m34(this.t33_1), f.m34(this.u33_1), f.m34(this.v33_1), this.w33_1) : (equals(this.x33_1, RGBColorSpaces_getInstance().v34_1) ? equals(space, SRGB_getInstance()) : false) ? space.e34(f.n34(this.t33_1), f.n34(this.u33_1), f.n34(this.v33_1), this.w33_1) : this.k35().q35(space);
|
|
595
595
|
};
|
|
596
|
-
protoOf(RGB).
|
|
597
|
-
return this.
|
|
596
|
+
protoOf(RGB).r35 = function () {
|
|
597
|
+
return this.s35(coerceIn(this.t33_1, 0.0, 1.0), coerceIn(this.u33_1, 0.0, 1.0), coerceIn(this.v33_1, 0.0, 1.0), coerceIn(this.w33_1, 0.0, 1.0));
|
|
598
598
|
};
|
|
599
|
-
protoOf(RGB).
|
|
599
|
+
protoOf(RGB).t35 = function () {
|
|
600
600
|
var tmp$ret$3;
|
|
601
601
|
$l$block: {
|
|
602
602
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
603
603
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
604
|
-
var $this$toSRGB = this.
|
|
605
|
-
var r = $this$toSRGB.
|
|
606
|
-
var g = $this$toSRGB.
|
|
607
|
-
var b = $this$toSRGB.
|
|
604
|
+
var $this$toSRGB = this.j35(SRGB_getInstance());
|
|
605
|
+
var r = $this$toSRGB.t33_1;
|
|
606
|
+
var g = $this$toSRGB.u33_1;
|
|
607
|
+
var b = $this$toSRGB.v33_1;
|
|
608
608
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
609
609
|
var min = Math.min(r, g, b);
|
|
610
610
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -626,94 +626,94 @@
|
|
|
626
626
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
627
627
|
var h_0 = normalizeDeg(h);
|
|
628
628
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
629
|
-
tmp$ret$3 = new HSV(h_0, s, max, this.
|
|
629
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.w33_1);
|
|
630
630
|
break $l$block;
|
|
631
631
|
}
|
|
632
632
|
return tmp$ret$3;
|
|
633
633
|
};
|
|
634
|
-
protoOf(RGB).
|
|
635
|
-
var f = this.
|
|
634
|
+
protoOf(RGB).k35 = function () {
|
|
635
|
+
var f = this.x33_1.q34();
|
|
636
636
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
637
|
-
var this_0 = _Matrix___init__impl__q3kp4w(this.
|
|
638
|
-
var v0 = f.
|
|
639
|
-
var v1 = f.
|
|
640
|
-
var v2 = f.
|
|
637
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.x33_1.r34());
|
|
638
|
+
var v0 = f.m34(this.t33_1);
|
|
639
|
+
var v1 = f.m34(this.u33_1);
|
|
640
|
+
var v2 = f.m34(this.v33_1);
|
|
641
641
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
642
642
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
643
643
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
644
644
|
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
645
|
-
return XYZColorSpace(this.
|
|
645
|
+
return XYZColorSpace(this.x33_1.t34()).e34(x, y, z, this.w33_1);
|
|
646
646
|
};
|
|
647
|
-
protoOf(RGB).
|
|
647
|
+
protoOf(RGB).r33 = function () {
|
|
648
648
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
649
|
-
var $this$toSRGB = this.
|
|
649
|
+
var $this$toSRGB = this.j35(SRGB_getInstance());
|
|
650
650
|
// Inline function 'kotlin.math.roundToInt' call
|
|
651
|
-
var this_0 = $this$toSRGB.
|
|
651
|
+
var this_0 = $this$toSRGB.t35().b34_1 * 100;
|
|
652
652
|
var value = roundToInt(this_0);
|
|
653
653
|
if (value === 30)
|
|
654
654
|
return new Ansi16(30);
|
|
655
655
|
var v = value / 50 | 0;
|
|
656
656
|
// Inline function 'kotlin.math.roundToInt' call
|
|
657
|
-
var this_1 = $this$toSRGB.
|
|
657
|
+
var this_1 = $this$toSRGB.v33_1;
|
|
658
658
|
var tmp$ret$1 = roundToInt(this_1);
|
|
659
659
|
var tmp = imul(tmp$ret$1, 4);
|
|
660
660
|
// Inline function 'kotlin.math.roundToInt' call
|
|
661
|
-
var this_2 = $this$toSRGB.
|
|
661
|
+
var this_2 = $this$toSRGB.u33_1;
|
|
662
662
|
var tmp$ret$2 = roundToInt(this_2);
|
|
663
663
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
664
664
|
// Inline function 'kotlin.math.roundToInt' call
|
|
665
|
-
var this_3 = $this$toSRGB.
|
|
665
|
+
var this_3 = $this$toSRGB.t33_1;
|
|
666
666
|
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
667
667
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
668
668
|
};
|
|
669
|
-
protoOf(RGB).
|
|
669
|
+
protoOf(RGB).u35 = function () {
|
|
670
670
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
671
|
-
var $this$toSRGB = this.
|
|
672
|
-
var ri = $this$toSRGB.
|
|
673
|
-
var gi = $this$toSRGB.
|
|
674
|
-
var bi = $this$toSRGB.
|
|
671
|
+
var $this$toSRGB = this.j35(SRGB_getInstance());
|
|
672
|
+
var ri = $this$toSRGB.g35();
|
|
673
|
+
var gi = $this$toSRGB.h35();
|
|
674
|
+
var bi = $this$toSRGB.i35();
|
|
675
675
|
var tmp;
|
|
676
676
|
if (ri === gi ? gi === bi : false) {
|
|
677
677
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
678
678
|
} else {
|
|
679
679
|
// Inline function 'kotlin.math.roundToInt' call
|
|
680
|
-
var this_0 = $this$toSRGB.
|
|
680
|
+
var this_0 = $this$toSRGB.t33_1 * 5;
|
|
681
681
|
var tmp$ret$0 = roundToInt(this_0);
|
|
682
682
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
683
683
|
// Inline function 'kotlin.math.roundToInt' call
|
|
684
|
-
var this_1 = $this$toSRGB.
|
|
684
|
+
var this_1 = $this$toSRGB.u33_1 * 5;
|
|
685
685
|
var tmp$ret$1 = roundToInt(this_1);
|
|
686
686
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
687
687
|
// Inline function 'kotlin.math.roundToInt' call
|
|
688
|
-
var this_2 = $this$toSRGB.
|
|
688
|
+
var this_2 = $this$toSRGB.v33_1 * 5;
|
|
689
689
|
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
690
690
|
}
|
|
691
691
|
var code = tmp;
|
|
692
692
|
return new Ansi256(code);
|
|
693
693
|
};
|
|
694
|
-
protoOf(RGB).
|
|
695
|
-
return this.
|
|
694
|
+
protoOf(RGB).m33 = function () {
|
|
695
|
+
return this.j35(RGBColorSpaces_getInstance().u34_1);
|
|
696
696
|
};
|
|
697
|
-
protoOf(RGB).
|
|
697
|
+
protoOf(RGB).v35 = function (r, g, b, alpha, space) {
|
|
698
698
|
return new RGB(r, g, b, alpha, space);
|
|
699
699
|
};
|
|
700
|
-
protoOf(RGB).
|
|
701
|
-
r = r === VOID ? this.
|
|
702
|
-
g = g === VOID ? this.
|
|
703
|
-
b = b === VOID ? this.
|
|
704
|
-
alpha = alpha === VOID ? this.
|
|
705
|
-
space = space === VOID ? this.
|
|
706
|
-
return $super === VOID ? this.
|
|
700
|
+
protoOf(RGB).s35 = function (r, g, b, alpha, space, $super) {
|
|
701
|
+
r = r === VOID ? this.t33_1 : r;
|
|
702
|
+
g = g === VOID ? this.u33_1 : g;
|
|
703
|
+
b = b === VOID ? this.v33_1 : b;
|
|
704
|
+
alpha = alpha === VOID ? this.w33_1 : alpha;
|
|
705
|
+
space = space === VOID ? this.x33_1 : space;
|
|
706
|
+
return $super === VOID ? this.v35(r, g, b, alpha, space) : $super.v35.call(this, r, g, b, alpha, space);
|
|
707
707
|
};
|
|
708
708
|
protoOf(RGB).toString = function () {
|
|
709
|
-
return 'RGB(r=' + this.
|
|
709
|
+
return 'RGB(r=' + this.t33_1 + ', g=' + this.u33_1 + ', b=' + this.v33_1 + ', alpha=' + this.w33_1 + ', space=' + this.x33_1 + ')';
|
|
710
710
|
};
|
|
711
711
|
protoOf(RGB).hashCode = function () {
|
|
712
|
-
var result = getNumberHashCode(this.
|
|
712
|
+
var result = getNumberHashCode(this.t33_1);
|
|
713
|
+
result = imul(result, 31) + getNumberHashCode(this.u33_1) | 0;
|
|
713
714
|
result = imul(result, 31) + getNumberHashCode(this.v33_1) | 0;
|
|
714
715
|
result = imul(result, 31) + getNumberHashCode(this.w33_1) | 0;
|
|
715
|
-
result = imul(result, 31) +
|
|
716
|
-
result = imul(result, 31) + hashCode(this.y33_1) | 0;
|
|
716
|
+
result = imul(result, 31) + hashCode(this.x33_1) | 0;
|
|
717
717
|
return result;
|
|
718
718
|
};
|
|
719
719
|
protoOf(RGB).equals = function (other) {
|
|
@@ -722,6 +722,8 @@
|
|
|
722
722
|
if (!(other instanceof RGB))
|
|
723
723
|
return false;
|
|
724
724
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
725
|
+
if (!equals(this.t33_1, tmp0_other_with_cast.t33_1))
|
|
726
|
+
return false;
|
|
725
727
|
if (!equals(this.u33_1, tmp0_other_with_cast.u33_1))
|
|
726
728
|
return false;
|
|
727
729
|
if (!equals(this.v33_1, tmp0_other_with_cast.v33_1))
|
|
@@ -730,8 +732,6 @@
|
|
|
730
732
|
return false;
|
|
731
733
|
if (!equals(this.x33_1, tmp0_other_with_cast.x33_1))
|
|
732
734
|
return false;
|
|
733
|
-
if (!equals(this.y33_1, tmp0_other_with_cast.y33_1))
|
|
734
|
-
return false;
|
|
735
735
|
return true;
|
|
736
736
|
};
|
|
737
737
|
function parseHex(_this__u8e3s4, startIndex) {
|
|
@@ -832,18 +832,18 @@
|
|
|
832
832
|
var ACES_AP1_B;
|
|
833
833
|
function RGBColorSpaces() {
|
|
834
834
|
RGBColorSpaces_instance = this;
|
|
835
|
-
this.
|
|
836
|
-
this.
|
|
837
|
-
this.
|
|
838
|
-
this.
|
|
839
|
-
this.
|
|
840
|
-
this.
|
|
841
|
-
this.
|
|
842
|
-
this.
|
|
843
|
-
this.
|
|
844
|
-
this.
|
|
845
|
-
this.
|
|
846
|
-
this.
|
|
835
|
+
this.u34_1 = SRGB_getInstance();
|
|
836
|
+
this.v34_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().h33_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
837
|
+
this.w34_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
838
|
+
this.x34_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
839
|
+
this.y34_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
840
|
+
this.z34_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
841
|
+
this.a35_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().h33_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));
|
|
842
|
+
this.b35_1 = BT2020Space_getInstance();
|
|
843
|
+
this.c35_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().h33_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
844
|
+
this.d35_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));
|
|
845
|
+
this.e35_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().h33_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
846
|
+
this.f35_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().f33_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));
|
|
847
847
|
}
|
|
848
848
|
var RGBColorSpaces_instance;
|
|
849
849
|
function RGBColorSpaces_getInstance() {
|
|
@@ -853,14 +853,17 @@
|
|
|
853
853
|
}
|
|
854
854
|
function SRGB() {
|
|
855
855
|
SRGB_instance = this;
|
|
856
|
-
this.
|
|
857
|
-
this.
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
}
|
|
863
|
-
protoOf(SRGB).
|
|
856
|
+
this.f34_1 = 'sRGB';
|
|
857
|
+
this.g34_1 = rectangularComponentInfo('RGB');
|
|
858
|
+
this.h34_1 = Illuminant_getInstance().h33_1;
|
|
859
|
+
this.i34_1 = SRGBTransferFunctions_instance;
|
|
860
|
+
this.j34_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.h34_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
861
|
+
this.k34_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.j34_1)));
|
|
862
|
+
}
|
|
863
|
+
protoOf(SRGB).t34 = function () {
|
|
864
|
+
return this.h34_1;
|
|
865
|
+
};
|
|
866
|
+
protoOf(SRGB).q34 = function () {
|
|
864
867
|
return this.i34_1;
|
|
865
868
|
};
|
|
866
869
|
protoOf(SRGB).r34 = function () {
|
|
@@ -869,13 +872,10 @@
|
|
|
869
872
|
protoOf(SRGB).s34 = function () {
|
|
870
873
|
return this.k34_1;
|
|
871
874
|
};
|
|
872
|
-
protoOf(SRGB).t34 = function () {
|
|
873
|
-
return this.l34_1;
|
|
874
|
-
};
|
|
875
875
|
protoOf(SRGB).toString = function () {
|
|
876
|
-
return this.
|
|
876
|
+
return this.f34_1;
|
|
877
877
|
};
|
|
878
|
-
protoOf(SRGB).
|
|
878
|
+
protoOf(SRGB).e34 = function (r, g, b, alpha) {
|
|
879
879
|
return new RGB(r, g, b, alpha, this);
|
|
880
880
|
};
|
|
881
881
|
var SRGB_instance;
|
|
@@ -890,18 +890,18 @@
|
|
|
890
890
|
}
|
|
891
891
|
function ACESccTransferFunctions() {
|
|
892
892
|
ACESccTransferFunctions_instance = this;
|
|
893
|
-
this.
|
|
894
|
-
this.
|
|
895
|
-
this.
|
|
893
|
+
this.w35_1 = 3.0517578125E-5;
|
|
894
|
+
this.x35_1 = 1.52587890625E-5;
|
|
895
|
+
this.y35_1 = -0.3013698630136986;
|
|
896
896
|
var tmp = this;
|
|
897
897
|
// Inline function 'kotlin.math.log2' call
|
|
898
|
-
tmp.
|
|
898
|
+
tmp.z35_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
899
899
|
}
|
|
900
|
-
protoOf(ACESccTransferFunctions).
|
|
900
|
+
protoOf(ACESccTransferFunctions).m34 = function (x) {
|
|
901
901
|
var tmp;
|
|
902
902
|
if (x <= -0.3013698630136986) {
|
|
903
903
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
904
|
-
} else if (x < this.
|
|
904
|
+
} else if (x < this.z35_1) {
|
|
905
905
|
// Inline function 'kotlin.math.pow' call
|
|
906
906
|
var x_0 = x * 17.52 - 9.72;
|
|
907
907
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -910,7 +910,7 @@
|
|
|
910
910
|
}
|
|
911
911
|
return tmp;
|
|
912
912
|
};
|
|
913
|
-
protoOf(ACESccTransferFunctions).
|
|
913
|
+
protoOf(ACESccTransferFunctions).n34 = function (x) {
|
|
914
914
|
var tmp;
|
|
915
915
|
if (x < 3.0517578125E-5) {
|
|
916
916
|
// Inline function 'kotlin.math.log2' call
|
|
@@ -930,17 +930,17 @@
|
|
|
930
930
|
}
|
|
931
931
|
function ACEScctTransferFunctions() {
|
|
932
932
|
ACEScctTransferFunctions_instance = this;
|
|
933
|
-
this.
|
|
934
|
-
this.
|
|
933
|
+
this.a36_1 = 10.5402377416545;
|
|
934
|
+
this.b36_1 = 0.0729055341958355;
|
|
935
935
|
var tmp = this;
|
|
936
936
|
// Inline function 'kotlin.math.log2' call
|
|
937
|
-
tmp.
|
|
937
|
+
tmp.c36_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
938
938
|
}
|
|
939
|
-
protoOf(ACEScctTransferFunctions).
|
|
939
|
+
protoOf(ACEScctTransferFunctions).m34 = function (x) {
|
|
940
940
|
var tmp;
|
|
941
941
|
if (x <= 0.155251141552511) {
|
|
942
942
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
943
|
-
} else if (x < this.
|
|
943
|
+
} else if (x < this.c36_1) {
|
|
944
944
|
// Inline function 'kotlin.math.pow' call
|
|
945
945
|
var x_0 = x * 17.52 - 9.72;
|
|
946
946
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -949,7 +949,7 @@
|
|
|
949
949
|
}
|
|
950
950
|
return tmp;
|
|
951
951
|
};
|
|
952
|
-
protoOf(ACEScctTransferFunctions).
|
|
952
|
+
protoOf(ACEScctTransferFunctions).n34 = function (x) {
|
|
953
953
|
var tmp;
|
|
954
954
|
if (x < 0.0078125) {
|
|
955
955
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -967,30 +967,30 @@
|
|
|
967
967
|
}
|
|
968
968
|
function BT2020Space() {
|
|
969
969
|
BT2020Space_instance = this;
|
|
970
|
-
this.
|
|
971
|
-
this.
|
|
972
|
-
this.
|
|
973
|
-
this.
|
|
974
|
-
this.
|
|
975
|
-
this.
|
|
976
|
-
}
|
|
977
|
-
protoOf(BT2020Space).
|
|
970
|
+
this.d36_1 = 'BT.2020';
|
|
971
|
+
this.e36_1 = rectangularComponentInfo('RGB');
|
|
972
|
+
this.f36_1 = Illuminant_getInstance().h33_1;
|
|
973
|
+
this.g36_1 = BT2020TransferFunctions_getInstance();
|
|
974
|
+
this.h36_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.f36_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
|
|
975
|
+
this.i36_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.h36_1)));
|
|
976
|
+
}
|
|
977
|
+
protoOf(BT2020Space).t34 = function () {
|
|
978
|
+
return this.f36_1;
|
|
979
|
+
};
|
|
980
|
+
protoOf(BT2020Space).q34 = function () {
|
|
978
981
|
return this.g36_1;
|
|
979
982
|
};
|
|
983
|
+
protoOf(BT2020Space).e34 = function (r, g, b, alpha) {
|
|
984
|
+
return new RGB(r, g, b, alpha, this);
|
|
985
|
+
};
|
|
980
986
|
protoOf(BT2020Space).r34 = function () {
|
|
981
987
|
return this.h36_1;
|
|
982
988
|
};
|
|
983
|
-
protoOf(BT2020Space).f34 = function (r, g, b, alpha) {
|
|
984
|
-
return new RGB(r, g, b, alpha, this);
|
|
985
|
-
};
|
|
986
989
|
protoOf(BT2020Space).s34 = function () {
|
|
987
990
|
return this.i36_1;
|
|
988
991
|
};
|
|
989
|
-
protoOf(BT2020Space).t34 = function () {
|
|
990
|
-
return this.j36_1;
|
|
991
|
-
};
|
|
992
992
|
protoOf(BT2020Space).toString = function () {
|
|
993
|
-
return this.
|
|
993
|
+
return this.d36_1;
|
|
994
994
|
};
|
|
995
995
|
var BT2020Space_instance;
|
|
996
996
|
function BT2020Space_getInstance() {
|
|
@@ -1000,12 +1000,12 @@
|
|
|
1000
1000
|
}
|
|
1001
1001
|
function BT709TransferFunctions() {
|
|
1002
1002
|
BT709TransferFunctions_instance = this;
|
|
1003
|
-
this.
|
|
1003
|
+
this.j36_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1004
1004
|
}
|
|
1005
|
-
protoOf(BT709TransferFunctions).
|
|
1006
|
-
return numberToDouble(x < this.
|
|
1005
|
+
protoOf(BT709TransferFunctions).m34 = function (x) {
|
|
1006
|
+
return numberToDouble(x < this.j36_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
1007
1007
|
};
|
|
1008
|
-
protoOf(BT709TransferFunctions).
|
|
1008
|
+
protoOf(BT709TransferFunctions).n34 = function (x) {
|
|
1009
1009
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1010
1010
|
};
|
|
1011
1011
|
var BT709TransferFunctions_instance;
|
|
@@ -1016,10 +1016,10 @@
|
|
|
1016
1016
|
}
|
|
1017
1017
|
function SRGBTransferFunctions() {
|
|
1018
1018
|
}
|
|
1019
|
-
protoOf(SRGBTransferFunctions).
|
|
1019
|
+
protoOf(SRGBTransferFunctions).n34 = function (x) {
|
|
1020
1020
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
1021
1021
|
};
|
|
1022
|
-
protoOf(SRGBTransferFunctions).
|
|
1022
|
+
protoOf(SRGBTransferFunctions).m34 = function (x) {
|
|
1023
1023
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1024
1024
|
};
|
|
1025
1025
|
var SRGBTransferFunctions_instance;
|
|
@@ -1027,12 +1027,12 @@
|
|
|
1027
1027
|
return SRGBTransferFunctions_instance;
|
|
1028
1028
|
}
|
|
1029
1029
|
function ROMMTransferFunctions() {
|
|
1030
|
-
this.
|
|
1030
|
+
this.k36_1 = 0.001953;
|
|
1031
1031
|
}
|
|
1032
|
-
protoOf(ROMMTransferFunctions).
|
|
1032
|
+
protoOf(ROMMTransferFunctions).m34 = function (x) {
|
|
1033
1033
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
1034
1034
|
};
|
|
1035
|
-
protoOf(ROMMTransferFunctions).
|
|
1035
|
+
protoOf(ROMMTransferFunctions).n34 = function (x) {
|
|
1036
1036
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
1037
1037
|
};
|
|
1038
1038
|
var ROMMTransferFunctions_instance;
|
|
@@ -1041,13 +1041,13 @@
|
|
|
1041
1041
|
}
|
|
1042
1042
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1043
1043
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1044
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1045
|
-
var wp = whitePoint.
|
|
1044
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.l36_1, g.l36_1, b.l36_1, r.m36_1, g.m36_1, b.m36_1, r.o36(), g.o36(), b.o36());
|
|
1045
|
+
var wp = whitePoint.b33_1;
|
|
1046
1046
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1047
1047
|
var this_0 = inverse(primaries);
|
|
1048
|
-
var v0 = wp.
|
|
1049
|
-
var v1 = wp.
|
|
1050
|
-
var v2 = wp.
|
|
1048
|
+
var v0 = wp.p36();
|
|
1049
|
+
var v1 = wp.n36_1;
|
|
1050
|
+
var v2 = wp.q36();
|
|
1051
1051
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1052
1052
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
1053
1053
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
@@ -1055,41 +1055,41 @@
|
|
|
1055
1055
|
return dotDiagonal(primaries, x, y, z);
|
|
1056
1056
|
}
|
|
1057
1057
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
|
|
1058
|
-
this.
|
|
1059
|
-
this.
|
|
1060
|
-
this.
|
|
1061
|
-
this.
|
|
1062
|
-
this.
|
|
1063
|
-
this.
|
|
1064
|
-
this.
|
|
1065
|
-
this.
|
|
1066
|
-
this.
|
|
1067
|
-
}
|
|
1068
|
-
protoOf(RGBColorSpaceImpl).
|
|
1058
|
+
this.r36_1 = name;
|
|
1059
|
+
this.s36_1 = whitePoint;
|
|
1060
|
+
this.t36_1 = transferFunctions;
|
|
1061
|
+
this.u36_1 = r;
|
|
1062
|
+
this.v36_1 = g;
|
|
1063
|
+
this.w36_1 = b;
|
|
1064
|
+
this.x36_1 = rectangularComponentInfo('RGB');
|
|
1065
|
+
this.y36_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.s36_1, this.u36_1, this.v36_1, this.w36_1));
|
|
1066
|
+
this.z36_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.y36_1)));
|
|
1067
|
+
}
|
|
1068
|
+
protoOf(RGBColorSpaceImpl).t34 = function () {
|
|
1069
|
+
return this.s36_1;
|
|
1070
|
+
};
|
|
1071
|
+
protoOf(RGBColorSpaceImpl).q34 = function () {
|
|
1069
1072
|
return this.t36_1;
|
|
1070
1073
|
};
|
|
1071
1074
|
protoOf(RGBColorSpaceImpl).r34 = function () {
|
|
1072
|
-
return this.
|
|
1075
|
+
return this.y36_1;
|
|
1073
1076
|
};
|
|
1074
1077
|
protoOf(RGBColorSpaceImpl).s34 = function () {
|
|
1075
1078
|
return this.z36_1;
|
|
1076
1079
|
};
|
|
1077
|
-
protoOf(RGBColorSpaceImpl).t34 = function () {
|
|
1078
|
-
return this.a37_1;
|
|
1079
|
-
};
|
|
1080
1080
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1081
|
-
return this.
|
|
1081
|
+
return this.r36_1;
|
|
1082
1082
|
};
|
|
1083
|
-
protoOf(RGBColorSpaceImpl).
|
|
1083
|
+
protoOf(RGBColorSpaceImpl).e34 = function (r, g, b, alpha) {
|
|
1084
1084
|
return new RGB(r, g, b, alpha, this);
|
|
1085
1085
|
};
|
|
1086
1086
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1087
|
-
var result = getStringHashCode(this.
|
|
1088
|
-
result = imul(result, 31) + this.
|
|
1089
|
-
result = imul(result, 31) + hashCode(this.
|
|
1087
|
+
var result = getStringHashCode(this.r36_1);
|
|
1088
|
+
result = imul(result, 31) + this.s36_1.hashCode() | 0;
|
|
1089
|
+
result = imul(result, 31) + hashCode(this.t36_1) | 0;
|
|
1090
|
+
result = imul(result, 31) + this.u36_1.hashCode() | 0;
|
|
1090
1091
|
result = imul(result, 31) + this.v36_1.hashCode() | 0;
|
|
1091
1092
|
result = imul(result, 31) + this.w36_1.hashCode() | 0;
|
|
1092
|
-
result = imul(result, 31) + this.x36_1.hashCode() | 0;
|
|
1093
1093
|
return result;
|
|
1094
1094
|
};
|
|
1095
1095
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1098,32 +1098,32 @@
|
|
|
1098
1098
|
if (!(other instanceof RGBColorSpaceImpl))
|
|
1099
1099
|
return false;
|
|
1100
1100
|
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
1101
|
-
if (!(this.
|
|
1101
|
+
if (!(this.r36_1 === tmp0_other_with_cast.r36_1))
|
|
1102
1102
|
return false;
|
|
1103
|
-
if (!this.
|
|
1103
|
+
if (!this.s36_1.equals(tmp0_other_with_cast.s36_1))
|
|
1104
1104
|
return false;
|
|
1105
|
-
if (!equals(this.
|
|
1105
|
+
if (!equals(this.t36_1, tmp0_other_with_cast.t36_1))
|
|
1106
|
+
return false;
|
|
1107
|
+
if (!this.u36_1.equals(tmp0_other_with_cast.u36_1))
|
|
1106
1108
|
return false;
|
|
1107
1109
|
if (!this.v36_1.equals(tmp0_other_with_cast.v36_1))
|
|
1108
1110
|
return false;
|
|
1109
1111
|
if (!this.w36_1.equals(tmp0_other_with_cast.w36_1))
|
|
1110
1112
|
return false;
|
|
1111
|
-
if (!this.x36_1.equals(tmp0_other_with_cast.x36_1))
|
|
1112
|
-
return false;
|
|
1113
1113
|
return true;
|
|
1114
1114
|
};
|
|
1115
1115
|
function BT2020TransferFunctions() {
|
|
1116
1116
|
BT2020TransferFunctions_instance = this;
|
|
1117
|
-
this.
|
|
1118
|
-
this.
|
|
1117
|
+
this.a37_1 = 1.0993;
|
|
1118
|
+
this.b37_1 = 0.0181;
|
|
1119
1119
|
var tmp = this;
|
|
1120
1120
|
// Inline function 'kotlin.math.pow' call
|
|
1121
|
-
tmp.
|
|
1121
|
+
tmp.c37_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
|
|
1122
1122
|
}
|
|
1123
|
-
protoOf(BT2020TransferFunctions).
|
|
1124
|
-
return numberToDouble(x < this.
|
|
1123
|
+
protoOf(BT2020TransferFunctions).m34 = function (x) {
|
|
1124
|
+
return numberToDouble(x < this.c37_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
1125
1125
|
};
|
|
1126
|
-
protoOf(BT2020TransferFunctions).
|
|
1126
|
+
protoOf(BT2020TransferFunctions).n34 = function (x) {
|
|
1127
1127
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
1128
1128
|
};
|
|
1129
1129
|
var BT2020TransferFunctions_instance;
|
|
@@ -1150,13 +1150,13 @@
|
|
|
1150
1150
|
}
|
|
1151
1151
|
function Companion_3() {
|
|
1152
1152
|
Companion_instance_3 = this;
|
|
1153
|
-
this.
|
|
1153
|
+
this.d37_1 = XYZColorSpaces_getInstance().e37_1;
|
|
1154
1154
|
}
|
|
1155
|
-
protoOf(Companion_3).
|
|
1156
|
-
return this.
|
|
1155
|
+
protoOf(Companion_3).t34 = function () {
|
|
1156
|
+
return this.d37_1.t34();
|
|
1157
1157
|
};
|
|
1158
|
-
protoOf(Companion_3).
|
|
1159
|
-
return this.
|
|
1158
|
+
protoOf(Companion_3).e34 = function (x, y, z, alpha) {
|
|
1159
|
+
return this.d37_1.e34(x, y, z, alpha);
|
|
1160
1160
|
};
|
|
1161
1161
|
var Companion_instance_3;
|
|
1162
1162
|
function Companion_getInstance_3() {
|
|
@@ -1165,65 +1165,65 @@
|
|
|
1165
1165
|
return Companion_instance_3;
|
|
1166
1166
|
}
|
|
1167
1167
|
function adaptToM($this, space, m, mi) {
|
|
1168
|
-
if (space.
|
|
1168
|
+
if (space.t34().equals($this.p35_1.t34()))
|
|
1169
1169
|
return $this;
|
|
1170
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1170
|
+
var transform = chromaticAdaptationMatrix(space, $this.p35_1.t34().b33_1, m, mi);
|
|
1171
1171
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1172
|
-
var v0 = $this.
|
|
1173
|
-
var v1 = $this.
|
|
1174
|
-
var v2 = $this.
|
|
1172
|
+
var v0 = $this.l35_1;
|
|
1173
|
+
var v1 = $this.m35_1;
|
|
1174
|
+
var v2 = $this.n35_1;
|
|
1175
1175
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1176
1176
|
var xx = Matrix__get_impl_xogbpk(transform, 0, 0) * v0 + Matrix__get_impl_xogbpk(transform, 1, 0) * v1 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
1177
1177
|
var yy = Matrix__get_impl_xogbpk(transform, 0, 1) * v0 + Matrix__get_impl_xogbpk(transform, 1, 1) * v1 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
1178
1178
|
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * v0 + Matrix__get_impl_xogbpk(transform, 1, 2) * v1 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
1179
|
-
return space.
|
|
1179
|
+
return space.e34(xx, yy, zz, $this.o35_1);
|
|
1180
1180
|
}
|
|
1181
1181
|
function XYZ(x, y, z, alpha, space) {
|
|
1182
1182
|
Companion_getInstance_3();
|
|
1183
|
-
this.
|
|
1184
|
-
this.
|
|
1185
|
-
this.
|
|
1186
|
-
this.
|
|
1187
|
-
this.
|
|
1183
|
+
this.l35_1 = x;
|
|
1184
|
+
this.m35_1 = y;
|
|
1185
|
+
this.n35_1 = z;
|
|
1186
|
+
this.o35_1 = alpha;
|
|
1187
|
+
this.p35_1 = space;
|
|
1188
1188
|
}
|
|
1189
|
-
protoOf(XYZ).
|
|
1189
|
+
protoOf(XYZ).g37 = function (space) {
|
|
1190
1190
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1191
1191
|
};
|
|
1192
|
-
protoOf(XYZ).
|
|
1193
|
-
var tmp0_container = this.
|
|
1192
|
+
protoOf(XYZ).q35 = function (space) {
|
|
1193
|
+
var tmp0_container = this.g37(XYZColorSpace(space.t34()));
|
|
1194
1194
|
var x = tmp0_container.jd();
|
|
1195
1195
|
var y = tmp0_container.kd();
|
|
1196
1196
|
var z = tmp0_container.dh();
|
|
1197
|
-
var f = space.
|
|
1197
|
+
var f = space.q34();
|
|
1198
1198
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1199
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
1199
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.s34());
|
|
1200
1200
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1201
1201
|
var r = 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;
|
|
1202
1202
|
var g = 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;
|
|
1203
1203
|
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;
|
|
1204
|
-
return space.
|
|
1204
|
+
return space.e34(f.n34(r), f.n34(g), f.n34(b), this.o35_1);
|
|
1205
1205
|
};
|
|
1206
|
-
protoOf(XYZ).
|
|
1207
|
-
return this.
|
|
1206
|
+
protoOf(XYZ).m33 = function () {
|
|
1207
|
+
return this.q35(RGBColorSpaces_getInstance().u34_1);
|
|
1208
1208
|
};
|
|
1209
1209
|
protoOf(XYZ).jd = function () {
|
|
1210
|
-
return this.
|
|
1210
|
+
return this.l35_1;
|
|
1211
1211
|
};
|
|
1212
1212
|
protoOf(XYZ).kd = function () {
|
|
1213
|
-
return this.
|
|
1213
|
+
return this.m35_1;
|
|
1214
1214
|
};
|
|
1215
1215
|
protoOf(XYZ).dh = function () {
|
|
1216
|
-
return this.
|
|
1216
|
+
return this.n35_1;
|
|
1217
1217
|
};
|
|
1218
1218
|
protoOf(XYZ).toString = function () {
|
|
1219
|
-
return 'XYZ(x=' + this.
|
|
1219
|
+
return 'XYZ(x=' + this.l35_1 + ', y=' + this.m35_1 + ', z=' + this.n35_1 + ', alpha=' + this.o35_1 + ', space=' + this.p35_1 + ')';
|
|
1220
1220
|
};
|
|
1221
1221
|
protoOf(XYZ).hashCode = function () {
|
|
1222
|
-
var result = getNumberHashCode(this.
|
|
1222
|
+
var result = getNumberHashCode(this.l35_1);
|
|
1223
|
+
result = imul(result, 31) + getNumberHashCode(this.m35_1) | 0;
|
|
1223
1224
|
result = imul(result, 31) + getNumberHashCode(this.n35_1) | 0;
|
|
1224
1225
|
result = imul(result, 31) + getNumberHashCode(this.o35_1) | 0;
|
|
1225
|
-
result = imul(result, 31) +
|
|
1226
|
-
result = imul(result, 31) + hashCode(this.q35_1) | 0;
|
|
1226
|
+
result = imul(result, 31) + hashCode(this.p35_1) | 0;
|
|
1227
1227
|
return result;
|
|
1228
1228
|
};
|
|
1229
1229
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -1232,6 +1232,8 @@
|
|
|
1232
1232
|
if (!(other instanceof XYZ))
|
|
1233
1233
|
return false;
|
|
1234
1234
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1235
|
+
if (!equals(this.l35_1, tmp0_other_with_cast.l35_1))
|
|
1236
|
+
return false;
|
|
1235
1237
|
if (!equals(this.m35_1, tmp0_other_with_cast.m35_1))
|
|
1236
1238
|
return false;
|
|
1237
1239
|
if (!equals(this.n35_1, tmp0_other_with_cast.n35_1))
|
|
@@ -1240,17 +1242,15 @@
|
|
|
1240
1242
|
return false;
|
|
1241
1243
|
if (!equals(this.p35_1, tmp0_other_with_cast.p35_1))
|
|
1242
1244
|
return false;
|
|
1243
|
-
if (!equals(this.q35_1, tmp0_other_with_cast.q35_1))
|
|
1244
|
-
return false;
|
|
1245
1245
|
return true;
|
|
1246
1246
|
};
|
|
1247
1247
|
function XYZColorSpace(whitePoint) {
|
|
1248
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1248
|
+
return whitePoint.equals(Illuminant_getInstance().h33_1) ? XYZColorSpaces_getInstance().e37_1 : whitePoint.equals(Illuminant_getInstance().f33_1) ? XYZColorSpaces_getInstance().f37_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1249
1249
|
}
|
|
1250
1250
|
function XYZColorSpaces() {
|
|
1251
1251
|
XYZColorSpaces_instance = this;
|
|
1252
|
-
this.
|
|
1253
|
-
this.
|
|
1252
|
+
this.e37_1 = new XYZColorSpaceImpl(Illuminant_getInstance().h33_1);
|
|
1253
|
+
this.f37_1 = new XYZColorSpaceImpl(Illuminant_getInstance().f33_1);
|
|
1254
1254
|
}
|
|
1255
1255
|
var XYZColorSpaces_instance;
|
|
1256
1256
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1261,26 +1261,26 @@
|
|
|
1261
1261
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1262
1262
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1263
1263
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1264
|
-
var dstWp = _this__u8e3s4.
|
|
1265
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
1266
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
1264
|
+
var dstWp = _this__u8e3s4.t34().b33_1;
|
|
1265
|
+
var src = dot_0(xyzToLms, srcWp.p36(), srcWp.n36_1, srcWp.q36());
|
|
1266
|
+
var dst = dot_0(xyzToLms, dstWp.p36(), dstWp.n36_1, dstWp.q36());
|
|
1267
1267
|
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);
|
|
1268
1268
|
}
|
|
1269
1269
|
function XYZColorSpaceImpl(whitePoint) {
|
|
1270
|
-
this.
|
|
1271
|
-
this.
|
|
1270
|
+
this.h37_1 = whitePoint;
|
|
1271
|
+
this.i37_1 = rectangularComponentInfo('XYZ');
|
|
1272
1272
|
}
|
|
1273
|
-
protoOf(XYZColorSpaceImpl).
|
|
1274
|
-
return this.
|
|
1273
|
+
protoOf(XYZColorSpaceImpl).t34 = function () {
|
|
1274
|
+
return this.h37_1;
|
|
1275
1275
|
};
|
|
1276
1276
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1277
|
-
return 'XYZColorSpace(' + this.
|
|
1277
|
+
return 'XYZColorSpace(' + this.h37_1 + ')';
|
|
1278
1278
|
};
|
|
1279
|
-
protoOf(XYZColorSpaceImpl).
|
|
1279
|
+
protoOf(XYZColorSpaceImpl).e34 = function (x, y, z, alpha) {
|
|
1280
1280
|
return new XYZ(x, y, z, alpha, this);
|
|
1281
1281
|
};
|
|
1282
1282
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1283
|
-
return this.
|
|
1283
|
+
return this.h37_1.hashCode();
|
|
1284
1284
|
};
|
|
1285
1285
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1286
1286
|
if (this === other)
|
|
@@ -1288,7 +1288,7 @@
|
|
|
1288
1288
|
if (!(other instanceof XYZColorSpaceImpl))
|
|
1289
1289
|
return false;
|
|
1290
1290
|
var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
|
|
1291
|
-
if (!this.
|
|
1291
|
+
if (!this.h37_1.equals(tmp0_other_with_cast.h37_1))
|
|
1292
1292
|
return false;
|
|
1293
1293
|
return true;
|
|
1294
1294
|
};
|
|
@@ -1302,26 +1302,26 @@
|
|
|
1302
1302
|
}
|
|
1303
1303
|
function xyY(x, y, Y) {
|
|
1304
1304
|
Y = Y === VOID ? 1.0 : Y;
|
|
1305
|
-
this.
|
|
1306
|
-
this.
|
|
1307
|
-
this.
|
|
1305
|
+
this.l36_1 = x;
|
|
1306
|
+
this.m36_1 = y;
|
|
1307
|
+
this.n36_1 = Y;
|
|
1308
1308
|
}
|
|
1309
|
+
protoOf(xyY).o36 = function () {
|
|
1310
|
+
return 1 - this.l36_1 - this.m36_1;
|
|
1311
|
+
};
|
|
1309
1312
|
protoOf(xyY).p36 = function () {
|
|
1310
|
-
return
|
|
1313
|
+
return this.l36_1 * this.n36_1 / this.m36_1;
|
|
1311
1314
|
};
|
|
1312
1315
|
protoOf(xyY).q36 = function () {
|
|
1313
|
-
return this.m36_1 * this.
|
|
1314
|
-
};
|
|
1315
|
-
protoOf(xyY).r36 = function () {
|
|
1316
|
-
return (1 - this.m36_1 - this.n36_1) * this.o36_1 / this.n36_1;
|
|
1316
|
+
return (1 - this.l36_1 - this.m36_1) * this.n36_1 / this.m36_1;
|
|
1317
1317
|
};
|
|
1318
1318
|
protoOf(xyY).toString = function () {
|
|
1319
|
-
return 'xyY(x=' + this.
|
|
1319
|
+
return 'xyY(x=' + this.l36_1 + ', y=' + this.m36_1 + ', Y=' + this.n36_1 + ')';
|
|
1320
1320
|
};
|
|
1321
1321
|
protoOf(xyY).hashCode = function () {
|
|
1322
|
-
var result = getNumberHashCode(this.
|
|
1322
|
+
var result = getNumberHashCode(this.l36_1);
|
|
1323
|
+
result = imul(result, 31) + getNumberHashCode(this.m36_1) | 0;
|
|
1323
1324
|
result = imul(result, 31) + getNumberHashCode(this.n36_1) | 0;
|
|
1324
|
-
result = imul(result, 31) + getNumberHashCode(this.o36_1) | 0;
|
|
1325
1325
|
return result;
|
|
1326
1326
|
};
|
|
1327
1327
|
protoOf(xyY).equals = function (other) {
|
|
@@ -1330,36 +1330,36 @@
|
|
|
1330
1330
|
if (!(other instanceof xyY))
|
|
1331
1331
|
return false;
|
|
1332
1332
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1333
|
+
if (!equals(this.l36_1, tmp0_other_with_cast.l36_1))
|
|
1334
|
+
return false;
|
|
1333
1335
|
if (!equals(this.m36_1, tmp0_other_with_cast.m36_1))
|
|
1334
1336
|
return false;
|
|
1335
1337
|
if (!equals(this.n36_1, tmp0_other_with_cast.n36_1))
|
|
1336
1338
|
return false;
|
|
1337
|
-
if (!equals(this.o36_1, tmp0_other_with_cast.o36_1))
|
|
1338
|
-
return false;
|
|
1339
1339
|
return true;
|
|
1340
1340
|
};
|
|
1341
1341
|
//region block: post-declaration
|
|
1342
|
-
protoOf(Companion_2).
|
|
1343
|
-
protoOf(Companion_2).
|
|
1344
|
-
protoOf(Companion_2).
|
|
1345
|
-
protoOf(SRGB).
|
|
1346
|
-
protoOf(SRGB).
|
|
1347
|
-
protoOf(SRGB).
|
|
1342
|
+
protoOf(Companion_2).o33 = from255$default;
|
|
1343
|
+
protoOf(Companion_2).n33 = invoke$default;
|
|
1344
|
+
protoOf(Companion_2).s33 = invoke$default_0;
|
|
1345
|
+
protoOf(SRGB).n33 = invoke$default;
|
|
1346
|
+
protoOf(SRGB).o34 = invoke;
|
|
1347
|
+
protoOf(SRGB).s33 = invoke$default_0;
|
|
1348
1348
|
protoOf(SRGB).w28 = invoke_0;
|
|
1349
|
-
protoOf(SRGB).
|
|
1350
|
-
protoOf(SRGB).
|
|
1351
|
-
protoOf(BT2020Space).
|
|
1352
|
-
protoOf(BT2020Space).
|
|
1353
|
-
protoOf(BT2020Space).
|
|
1349
|
+
protoOf(SRGB).p34 = from255;
|
|
1350
|
+
protoOf(SRGB).o33 = from255$default;
|
|
1351
|
+
protoOf(BT2020Space).n33 = invoke$default;
|
|
1352
|
+
protoOf(BT2020Space).o34 = invoke;
|
|
1353
|
+
protoOf(BT2020Space).s33 = invoke$default_0;
|
|
1354
1354
|
protoOf(BT2020Space).w28 = invoke_0;
|
|
1355
|
-
protoOf(BT2020Space).
|
|
1356
|
-
protoOf(BT2020Space).
|
|
1357
|
-
protoOf(RGBColorSpaceImpl).
|
|
1358
|
-
protoOf(RGBColorSpaceImpl).
|
|
1359
|
-
protoOf(RGBColorSpaceImpl).
|
|
1355
|
+
protoOf(BT2020Space).p34 = from255;
|
|
1356
|
+
protoOf(BT2020Space).o33 = from255$default;
|
|
1357
|
+
protoOf(RGBColorSpaceImpl).n33 = invoke$default;
|
|
1358
|
+
protoOf(RGBColorSpaceImpl).o34 = invoke;
|
|
1359
|
+
protoOf(RGBColorSpaceImpl).s33 = invoke$default_0;
|
|
1360
1360
|
protoOf(RGBColorSpaceImpl).w28 = invoke_0;
|
|
1361
|
-
protoOf(RGBColorSpaceImpl).
|
|
1362
|
-
protoOf(RGBColorSpaceImpl).
|
|
1361
|
+
protoOf(RGBColorSpaceImpl).p34 = from255;
|
|
1362
|
+
protoOf(RGBColorSpaceImpl).o33 = from255$default;
|
|
1363
1363
|
//endregion
|
|
1364
1364
|
//region block: init
|
|
1365
1365
|
LinearTransferFunctions_instance = new LinearTransferFunctions();
|