comparison layer/TimeValueLayer.cpp @ 1540:9ce6f69cd485

Debug output tweaks
author Chris Cannam
date Wed, 16 Oct 2019 12:13:28 +0100
parents 4f8c72adbf43
children e6362cf5ff1d
comparison
equal deleted inserted replaced
1539:bfacecf7ea7e 1540:9ce6f69cd485
782 if (shouldAutoAlign()) { 782 if (shouldAutoAlign()) {
783 783
784 if (!v->getVisibleExtentsForUnit(getScaleUnits(), min, max, log)) { 784 if (!v->getVisibleExtentsForUnit(getScaleUnits(), min, max, log)) {
785 min = model->getValueMinimum(); 785 min = model->getValueMinimum();
786 max = model->getValueMaximum(); 786 max = model->getValueMaximum();
787 } else if (log) { 787 } else {
788 LogRange::mapRange(min, max); 788 #ifdef DEBUG_TIME_VALUE_LAYER
789 SVCERR << "getScaleExtents: view returned min = " << min
790 << ", max = " << max << ", log = " << log << endl;
791 #endif
792 if (log) {
793 LogRange::mapRange(min, max);
794 #ifdef DEBUG_TIME_VALUE_LAYER
795 SVCERR << "getScaleExtents: mapped to min = " << min
796 << ", max = " << max << endl;
797 #endif
798 }
789 } 799 }
790 800
791 } else if (m_verticalScale == PlusMinusOneScale) { 801 } else if (m_verticalScale == PlusMinusOneScale) {
792 802
793 min = -1.0; 803 min = -1.0;
816 int h = v->getPaintHeight(); 826 int h = v->getPaintHeight();
817 827
818 getScaleExtents(v, min, max, logarithmic); 828 getScaleExtents(v, min, max, logarithmic);
819 829
820 #ifdef DEBUG_TIME_VALUE_LAYER 830 #ifdef DEBUG_TIME_VALUE_LAYER
821 cerr << "getYForValue(" << val << "): min " << min << ", max " 831 SVCERR << "getYForValue(" << val << "): min " << min << ", max "
822 << max << ", log " << logarithmic << endl; 832 << max << ", log " << logarithmic << endl;
823 #endif 833 #endif
824 834
825 if (logarithmic) { 835 if (logarithmic) {
826 val = LogRange::map(val); 836 val = LogRange::map(val);
837 #ifdef DEBUG_TIME_VALUE_LAYER
838 SVCERR << "-> " << val << endl;
839 #endif
827 } 840 }
828 841
829 return int(h - ((val - min) * h) / (max - min)); 842 return int(h - ((val - min) * h) / (max - min));
830 } 843 }
831 844