From: Joel Holdsworth Date: Wed, 20 Mar 2013 20:24:55 +0000 (+0000) Subject: Draw analog with a polyline rather than points X-Git-Tag: pulseview-0.1.0~69 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=306d43a7ab62b534bbc1a5d19a381f7e0b787dfe;p=pulseview.git Draw analog with a polyline rather than points --- diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index e2993086..251a0ffb 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -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;