Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.cpp @ 105:571805759a66
* 1502816 file export is too slow and memory-hungry
Use text stream when writing to file instead of accumulating into a string.
* 1500625 Auto-align in MIDI layer confusing
Make value extents convert to Hz in return value
* 1494623: Duplicate display of frame 0 from vamp plugin output
author | Chris Cannam |
---|---|
date | Thu, 15 Jun 2006 15:48:05 +0000 |
parents | 2be85befe873 |
children | 999ae0f7d10c |
comparison
equal
deleted
inserted
replaced
104:1348818e7be7 | 105:571805759a66 |
---|---|
361 | 361 |
362 QImage img(w, h, QImage::Format_RGB32); | 362 QImage img(w, h, QImage::Format_RGB32); |
363 | 363 |
364 for (int x = x0; x < x1; ++x) { | 364 for (int x = x0; x < x1; ++x) { |
365 | 365 |
366 float sx0 = (float(v->getFrameForX(x)) - modelStart) / modelWindow; | 366 long xf = v->getFrameForX(x); |
367 if (xf < 0) { | |
368 for (int y = 0; y < h; ++y) { | |
369 img.setPixel(x - x0, y, m_cache->color(0)); | |
370 } | |
371 continue; | |
372 } | |
373 | |
374 float sx0 = (float(xf) - modelStart) / modelWindow; | |
367 float sx1 = (float(v->getFrameForX(x+1)) - modelStart) / modelWindow; | 375 float sx1 = (float(v->getFrameForX(x+1)) - modelStart) / modelWindow; |
368 | 376 |
369 int sx0i = int(sx0 + 0.001); | 377 int sx0i = int(sx0 + 0.001); |
370 int sx1i = int(sx1); | 378 int sx1i = int(sx1); |
371 | 379 |