From 563c8fd5da76b76041a2985d49a3c70bd24a16f1 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 18 Feb 2021 16:05:08 -0600 Subject: [PATCH] Fixing regression with Waveform generation. --- src/Frame.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Frame.cpp b/src/Frame.cpp index 3e9bb8efd..5644db58c 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -203,16 +203,8 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G float value = samples[sample] * 100.0; // Append a line segment for each sample - if (value != 0.0) { - // LINE - lines.push_back(QPointF(X,Y)); - lines.push_back(QPointF(X,Y-value)); - } - else { - // DOT - lines.push_back(QPointF(X,Y)); - lines.push_back(QPointF(X,Y)); - } + lines.push_back(QPointF(X,Y+1.0)); + lines.push_back(QPointF(X,(Y-value)+1.0)); } // Add Channel Label Coordinate @@ -235,7 +227,7 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G QPen pen; pen.setColor(QColor(Red, Green, Blue, Alpha)); pen.setWidthF(1.0); - pen.setStyle(Qt::NoPen); + pen.setStyle(Qt::SolidLine); painter.setPen(pen); // Draw the waveform @@ -244,7 +236,7 @@ std::shared_ptr Frame::GetWaveform(int width, int height, int Red, int G // Resize Image (if requested) if (width != total_width || height != total_height) { - QImage scaled_wave_image = wave_image->scaled(width, height, Qt::IgnoreAspectRatio, Qt::FastTransformation); + QImage scaled_wave_image = wave_image->scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); wave_image = std::make_shared(scaled_wave_image); } }