2 var update = new Object();
4 update["rSlope"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 20., 0); }));
5 update["gSlope"] = update["rSlope"];
6 update["bSlope"] = update["rSlope"];
7 update["aSlope"] = update["rSlope"];
8 update["rOffset"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 8., -4); }));
9 update["gOffset"] = update["rOffset"];
10 update["bOffset"] = update["rOffset"];
11 update["aOffset"] = update["rOffset"];
12 update["rPower"] = update["rSlope"];
13 update["gPower"] = update["rSlope"];
14 update["bPower"] = update["rSlope"];
15 update["aPower"] = update["rSlope"];
16 update["saturation"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 10., 0); }));
18 function upd1(value, isDowngrade, factor, offset) {
19 var valueList = value.split(';');
20 var locale = new QLocale();
21 for (var i = 0; i < valueList.length; ++i) {
22 var current = valueList[i].split('=');
23 valueList[i] = current[0] + '=' + locale.toString(isDowngrade ? offset + current[1] * factor : (current[1] - offset) / factor);
25 return valueList.join(';');