# HG changeset patch # User Chris Cannam # Date 1223654628 0 # Node ID bcaeb2ba9b74ab61bea101d40b8fe5daa5799bbb # Parent 427e5c58658edaf4cb1353be2262d9fb5189924e * some plotting tweaks diff -r 427e5c58658e -r bcaeb2ba9b74 layer/TimeValueLayer.cpp --- a/layer/TimeValueLayer.cpp Thu Oct 09 20:10:28 2008 +0000 +++ b/layer/TimeValueLayer.cpp Fri Oct 10 16:03:48 2008 +0000 @@ -640,13 +640,20 @@ } if (m_plotStyle == PlotStems) { +/* paint.setPen(brushColour); if (y < origin - 1) { paint.drawRect(x + w/2, y + 1, 1, origin - y); } else if (y > origin + 1) { paint.drawRect(x + w/2, origin, 1, y - origin - 1); } +*/ paint.setPen(getBaseQColor()); + if (y < origin - 1) { + paint.drawLine(x + w/2, y + 1, x + w/2, origin); + } else if (y > origin + 1) { + paint.drawLine(x + w/2, origin, x + w/2, y - 1); + } } if (illuminateFrame == p.frame) { @@ -687,8 +694,14 @@ paint.restore(); } else if (m_plotStyle == PlotLines) { + + if (pointCount == 0) { + path.moveTo(x + w/2, y); + } + ++pointCount; - paint.drawLine(x + w/2, y, nx + w/2, ny); +// paint.drawLine(x + w/2, y, nx + w/2, ny); + path.lineTo(nx + w/2, ny); } else { @@ -739,7 +752,8 @@ } } - if (m_plotStyle == PlotCurve && !path.isEmpty()) { + if ((m_plotStyle == PlotCurve || m_plotStyle == PlotLines) + && !path.isEmpty()) { paint.setRenderHint(QPainter::Antialiasing, pointCount <= v->width()); paint.drawPath(path); }