Changeset 14138
- Timestamp:
- 06/09/12 21:54:08 (13 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r14136 r14138 540 540 out << stat.min << '\n'; 541 541 out << stat.med << '\n'; 542 out << stat.max << '\ 0';542 out << stat.max << '\x7f'; 543 543 for (auto it=vec.begin(); it!=vec.end(); it++) 544 544 { … … 548 548 for (uint64_t i=0; i<it->size(); i++) 549 549 { 550 float range = nearbyint(126*(double(it->at(i))-offset)/scale) +1; // [-2V; 2V]551 if (range>12 7)552 range=12 7;553 if (range< 1)554 range= 1;550 float range = nearbyint(126*(double(it->at(i))-offset)/scale); // [-2V; 2V] 551 if (range>126) 552 range=126; 553 if (range<0) 554 range=0; 555 555 val[i] = (uint8_t)range; 556 556 } … … 558 558 const char *ptr = reinterpret_cast<char*>(val.data()); 559 559 out.write(ptr, val.size()*sizeof(uint8_t)); 560 out << '\ 0';560 out << '\x7f'; 561 561 } 562 562 -
trunk/FACT++/www/smartfact/index.js
r14137 r14138 1119 1119 return HLStoRGB(0); 1120 1120 1121 var hue = (col-1)/127;1121 var hue = col/126; 1122 1122 return HLStoRGB(hue); 1123 1123 } … … 1367 1367 1368 1368 ctx.beginPath(); 1369 ctx.moveTo(ml, ch-mb- (data[j].charCodeAt(0)-1)/126*h);1369 ctx.moveTo(ml, ch-mb-data[j].charCodeAt(0)/126*h); 1370 1370 for (var i=1; i<data[j].length; i++) 1371 ctx.lineTo(ml+w/(data[j].length-1)*i, ch-mb- (data[j].charCodeAt(i)-1)/126*h);1371 ctx.lineTo(ml+w/(data[j].length-1)*i, ch-mb-data[j].charCodeAt(i)/126*h); 1372 1372 1373 1373 // --- finalize data --- … … 1523 1523 ctx.clearRect(0, 0, canv.width, canv.height); 1524 1524 1525 var data = result.split('\ 0');1525 var data = result.split('\x7f'); 1526 1526 if (data.length<2) 1527 1527 return;
Note:
See TracChangeset
for help on using the changeset viewer.