comparison layer/WaveformLayer.cpp @ 1352:4949061fcb8c zoom

Debug tweaks
author Chris Cannam
date Fri, 05 Oct 2018 09:59:41 +0100
parents 13d03ae0c6e0
children c2a3ac0a6688
comparison
equal deleted inserted replaced
1349:615eb28768ca 1352:4949061fcb8c
31 #include <QTextStream> 31 #include <QTextStream>
32 32
33 #include <iostream> 33 #include <iostream>
34 #include <cmath> 34 #include <cmath>
35 35
36 #define DEBUG_WAVEFORM_PAINT 1 36 //#define DEBUG_WAVEFORM_PAINT 1
37 //#define DEBUG_WAVEFORM_PAINT_BY_PIXEL 1 37 //#define DEBUG_WAVEFORM_PAINT_BY_PIXEL 1
38 38
39 using std::vector; 39 using std::vector;
40 40
41 41
731 WaveformLayer::paintChannel(LayerGeometryProvider *v, 731 WaveformLayer::paintChannel(LayerGeometryProvider *v,
732 QPainter *paint, 732 QPainter *paint,
733 QRect rect, int ch, 733 QRect rect, int ch,
734 const RangeVec &ranges, 734 const RangeVec &ranges,
735 int blockSize, 735 int blockSize,
736 sv_frame_t frame0, sv_frame_t frame1) 736 sv_frame_t frame0,
737 sv_frame_t frame1)
737 const 738 const
738 { 739 {
739 int x0 = rect.left(); 740 int x0 = rect.left();
740 int y0 = rect.top(); 741 int y0 = rect.top();
741 742
790 791
791 int rangeix = ch - minChannel; 792 int rangeix = ch - minChannel;
792 793
793 #ifdef DEBUG_WAVEFORM_PAINT 794 #ifdef DEBUG_WAVEFORM_PAINT
794 SVCERR << "paint channel " << ch << ": frame0 = " << frame0 << ", frame1 = " << frame1 << ", blockSize = " << blockSize << ", have " << ranges.size() << " range blocks of which ours is index " << rangeix << " with " << ranges[rangeix].size() << " ranges in it" << endl; 795 SVCERR << "paint channel " << ch << ": frame0 = " << frame0 << ", frame1 = " << frame1 << ", blockSize = " << blockSize << ", have " << ranges.size() << " range blocks of which ours is index " << rangeix << " with " << ranges[rangeix].size() << " ranges in it" << endl;
796 #else
797 (void)frame1; // not actually used
795 #endif 798 #endif
796 799
797 for (int x = x0; x <= x1; ++x) { 800 for (int x = x0; x <= x1; ++x) {
798 801
799 sv_frame_t f0, f1; 802 sv_frame_t f0, f1;