comparison layer/TimeValueLayer.cpp @ 7:634324c6296e

* switch off antialiasing for dense lines (for speed reasons)
author Chris Cannam
date Thu, 12 Jan 2006 17:45:23 +0000
parents 02aaea1ffaf7
children 8f5b812baaee
comparison
equal deleted inserted replaced
6:02aaea1ffaf7 7:634324c6296e
311 SparseTimeValueModel::PointList localPoints = 311 SparseTimeValueModel::PointList localPoints =
312 getLocalPoints(localPos.x()); 312 getLocalPoints(localPos.x());
313 if (!localPoints.empty()) illuminateFrame = localPoints.begin()->frame; 313 if (!localPoints.empty()) illuminateFrame = localPoints.begin()->frame;
314 } 314 }
315 315
316 int w = m_model->getResolution() / zoomLevel;
317
316 paint.save(); 318 paint.save();
317 319
318 if (m_plotStyle == PlotLines || 320 if (w > 1 &&
319 m_plotStyle == PlotCurve) { 321 (m_plotStyle == PlotLines ||
322 m_plotStyle == PlotCurve)) {
320 paint.setRenderHint(QPainter::Antialiasing, true); 323 paint.setRenderHint(QPainter::Antialiasing, true);
321 } 324 }
322 QPainterPath path; 325 QPainterPath path;
323 326
324 for (SparseTimeValueModel::PointList::const_iterator i = points.begin(); 327 for (SparseTimeValueModel::PointList::const_iterator i = points.begin();
328 331
329 int x = (p.frame - startFrame) / zoomLevel; 332 int x = (p.frame - startFrame) / zoomLevel;
330 int y = int(nearbyint(m_view->height() - 333 int y = int(nearbyint(m_view->height() -
331 ((p.value - min) * m_view->height()) / 334 ((p.value - min) * m_view->height()) /
332 (max - min))); 335 (max - min)));
333 int w = m_model->getResolution() / zoomLevel;
334 336
335 if (w < 1) w = 1; 337 if (w < 1) w = 1;
336 338
337 if (m_plotStyle == PlotLines || 339 if (m_plotStyle == PlotLines ||
338 m_plotStyle == PlotCurve) { 340 m_plotStyle == PlotCurve) {