comparison layer/TimeValueLayer.cpp @ 27:38fe0ea9e46e

* Some fixes to waveform layer greyscaling * Tidying in panner class
author Chris Cannam
date Fri, 03 Feb 2006 17:30:47 +0000
parents 94381052a6c9
children 202d1dca67d2
comparison
equal deleted inserted replaced
26:94381052a6c9 27:38fe0ea9e46e
460 if (m_plotStyle == PlotSegmentation) { 460 if (m_plotStyle == PlotSegmentation) {
461 461
462 SparseTimeValueModel::PointList::const_iterator j = i; 462 SparseTimeValueModel::PointList::const_iterator j = i;
463 ++j; 463 ++j;
464 464
465 int nx;
466
465 if (j != points.end()) { 467 if (j != points.end()) {
466
467 const SparseTimeValueModel::Point &q(*j); 468 const SparseTimeValueModel::Point &q(*j);
468 int nx = getXForFrame(q.frame); 469 nx = getXForFrame(q.frame);
469
470 if (nx == x) continue;
471
472 if (nx < x + 5 && illuminateFrame != p.frame) {
473 paint.setPen(Qt::NoPen);
474 }
475
476 paint.drawRect(x, -1, nx - x, m_view->height() + 1);
477
478 } else { 470 } else {
479 471 nx = getXForFrame(m_model->getEndFrame());
480 paint.drawLine(x, 0, x, m_view->height());
481 } 472 }
473
474 if (nx <= x) continue;
475
476 if (nx < x + 5 && illuminateFrame != p.frame) {
477 paint.setPen(Qt::NoPen);
478 }
479
480 paint.drawRect(x, -1, nx - x, m_view->height() + 1);
482 } 481 }
483 482
484 /// if (p.label != "") { 483 /// if (p.label != "") {
485 /// paint.drawText(x + 5, y - paint.fontMetrics().height() + paint.fontMetrics().ascent(), p.label); 484 /// paint.drawText(x + 5, y - paint.fontMetrics().height() + paint.fontMetrics().ascent(), p.label);
486 /// } 485 /// }