X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fanalogsignal.cpp;h=0ac6311116610356b12f0663fa0fc933539f801e;hb=f32905530347e1020d5ce7959123cf797c9a4829;hp=fe2979b0be8ac36efe3f520bda5d59a9e0abf9a5;hpb=ce11b2ea851633dc937881cdbd358541685b43be;p=pulseview.git diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index fe2979b0..0ac63111 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -181,7 +181,7 @@ void AnalogSignal::paint_envelope(QPainter &p, QRectF *const rects = new QRectF[e.length]; QRectF *rect = rects; - for(uint64_t sample = 0; sample < e.length-1; sample++) { + for (uint64_t sample = 0; sample < e.length-1; sample++) { const float x = ((e.scale * sample + e.start) / samples_per_pixel - pixels_offset) + left; const AnalogSegment::EnvelopeSample *const s = @@ -193,9 +193,9 @@ void AnalogSignal::paint_envelope(QPainter &p, const float t = y - min(s->min, (s+1)->max) * scale_; float h = b - t; - if(h >= 0.0f && h <= 1.0f) + if (h >= 0.0f && h <= 1.0f) h = 1.0f; - if(h <= 0.0f && h >= -1.0f) + if (h <= 0.0f && h >= -1.0f) h = -1.0f; *rect++ = QRectF(x, t, 1.0f, h);