comparison layer/Colour3DPlotLayer.cpp @ 533:a0e4176b0bf8

* another minor improvement
author Chris Cannam
date Tue, 19 May 2009 16:26:58 +0000
parents 188049db73fa
children 7a560380b6e2
comparison
equal deleted inserted replaced
532:188049db73fa 533:a0e4176b0bf8
772 tf.setPixelSize(binHeight > 7 ? binHeight - 2 : 5); 772 tf.setPixelSize(binHeight > 7 ? binHeight - 2 : 5);
773 paint.setFont(tf); 773 paint.setFont(tf);
774 } 774 }
775 */ 775 */
776 776
777 int py = 0; 777 int py = h;
778 778
779 for (size_t i = symin; i < symax; ++i) { 779 for (size_t i = symin; i < symax; ++i) {
780 780
781 size_t idx = i; 781 size_t idx = i;
782 if (m_invertVertical) idx = m_model->getHeight() - idx - 1; 782 if (m_invertVertical) idx = m_model->getHeight() - idx - 1;
796 y0 = lrintf(getYForBin(v, i)); 796 y0 = lrintf(getYForBin(v, i));
797 int h = py - y0; 797 int h = py - y0;
798 798
799 if (i > symin) { 799 if (i > symin) {
800 if (paint.fontMetrics().height() >= h) { 800 if (paint.fontMetrics().height() >= h) {
801 if (h >= 7) { 801 if (h >= 8) {
802 QFont tf = paint.font(); 802 QFont tf = paint.font();
803 tf.setPixelSize(h > 7 ? h-2 : 5); 803 tf.setPixelSize(h-2);
804 paint.setFont(tf); 804 paint.setFont(tf);
805 } else { 805 } else {
806 continue; 806 continue;
807 } 807 }
808 } 808 }