Mercurial > hg > svgui
comparison layer/TimeValueLayer.cpp @ 1430:31499c3520ee single-point
Use overspill to render time-value point line properly at edges
author | Chris Cannam |
---|---|
date | Wed, 20 Mar 2019 11:18:45 +0000 |
parents | 8a7c82282fbc |
children | af824022bffd |
comparison
equal
deleted
inserted
replaced
1429:8a7c82282fbc | 1430:31499c3520ee |
---|---|
936 int x0 = rect.left(), x1 = rect.right(); | 936 int x0 = rect.left(), x1 = rect.right(); |
937 sv_frame_t frame0 = v->getFrameForX(x0); | 937 sv_frame_t frame0 = v->getFrameForX(x0); |
938 sv_frame_t frame1 = v->getFrameForX(x1); | 938 sv_frame_t frame1 = v->getFrameForX(x1); |
939 if (m_derivative) --frame0; | 939 if (m_derivative) --frame0; |
940 | 940 |
941 EventVector points(m_model->getEventsWithin(frame0, frame1 - frame0)); | 941 EventVector points(m_model->getEventsWithin(frame0, frame1 - frame0, 1)); |
942 if (points.empty()) return; | 942 if (points.empty()) return; |
943 | 943 |
944 paint.setPen(getBaseQColor()); | 944 paint.setPen(getBaseQColor()); |
945 | 945 |
946 QColor brushColour(getBaseQColor()); | 946 QColor brushColour(getBaseQColor()); |
947 brushColour.setAlpha(80); | 947 brushColour.setAlpha(80); |
948 paint.setBrush(brushColour); | 948 paint.setBrush(brushColour); |
949 | 949 |
950 #ifdef DEBUG_TIME_VALUE_LAYER | 950 #ifdef DEBUG_TIME_VALUE_LAYER |
951 cerr << "TimeValueLayer::paint: resolution is " | 951 cerr << "TimeValueLayer::paint: resolution is " |
952 << m_model->getResolution() << " frames" << endl; | 952 << m_model->getResolution() << " frames" << endl; |
953 #endif | 953 #endif |
954 | 954 |
955 double min = m_model->getValueMinimum(); | 955 double min = m_model->getValueMinimum(); |
956 double max = m_model->getValueMaximum(); | 956 double max = m_model->getValueMaximum(); |
957 if (max == min) max = min + 1.0; | 957 if (max == min) max = min + 1.0; |