File indexing completed on 2024-05-12 04:52:38
0001 // SPDX-FileCopyrightText: Till Theato <root@ttill.de> 0002 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0003 0004 var update = new Object(); 0005 0006 update["rSlope"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 20., 0); })); 0007 update["gSlope"] = update["rSlope"]; 0008 update["bSlope"] = update["rSlope"]; 0009 update["aSlope"] = update["rSlope"]; 0010 update["rOffset"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 8., -4); })); 0011 update["gOffset"] = update["rOffset"]; 0012 update["bOffset"] = update["rOffset"]; 0013 update["aOffset"] = update["rOffset"]; 0014 update["rPower"] = update["rSlope"]; 0015 update["gPower"] = update["rSlope"]; 0016 update["bPower"] = update["rSlope"]; 0017 update["aPower"] = update["rSlope"]; 0018 update["saturation"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 10., 0); })); 0019 0020 function upd1(value, isDowngrade, factor, offset) { 0021 var valueList = value.split(';'); 0022 var locale = new QLocale(); 0023 for (var i = 0; i < valueList.length; ++i) { 0024 var current = valueList[i].split('='); 0025 valueList[i] = current[0] + '=' + locale.toString(isDowngrade ? offset + current[1] * factor : (current[1] - offset) / factor); 0026 } 0027 return valueList.join(';'); 0028 }