]> sigrok.org Git - pulseview.git/commitdiff
Draw analog with a polyline rather than points
authorJoel Holdsworth <redacted>
Wed, 20 Mar 2013 20:24:55 +0000 (20:24 +0000)
committerJoel Holdsworth <redacted>
Thu, 21 Mar 2013 22:44:19 +0000 (22:44 +0000)
pv/view/analogsignal.cpp

index e29930865f6601eccf8b43986db1f44f9523b090..251a0ffb5681870b165be0aac83de77d0d8f97f1 100644 (file)
@@ -82,7 +82,7 @@ void AnalogSignal::paint(QPainter &p, int y, int left, int right, double scale,
 
        const int64_t start_sample = min(max((int64_t)floor(start),
                (int64_t)0), last_sample);
-       const int64_t end_sample = min(max((int64_t)ceil(end),
+       const int64_t end_sample = min(max((int64_t)ceil(end) + 1,
                (int64_t)0), last_sample);
 
        if (samples_per_pixel < EnvelopeThreshold)
@@ -117,7 +117,7 @@ void AnalogSignal::paint_trace(QPainter &p,
                        y - samples[sample - start] * _scale);
        }
 
-       p.drawPoints(points, point - points);
+       p.drawPolyline(points, point - points);
 
        delete[] samples;
        delete[] points;