comparison layer/Colour3DPlotLayer.cpp @ 973:bc23c2cfff65 osx-retina

Rounding
author Chris Cannam
date Wed, 10 Jun 2015 14:27:55 +0100
parents 1011ffb1b6d5
children 7242fe160c19
comparison
equal deleted inserted replaced
972:1011ffb1b6d5 973:bc23c2cfff65
867 QString maxstr = QString("%1").arg(max); 867 QString maxstr = QString("%1").arg(max);
868 868
869 paint.save(); 869 paint.save();
870 870
871 QFont font = paint.font(); 871 QFont font = paint.font();
872 font.setPixelSize(font.pixelSize() * 0.65); 872 font.setPixelSize(int(font.pixelSize() * 0.65));
873 paint.setFont(font); 873 paint.setFont(font);
874 874
875 int msw = paint.fontMetrics().width(maxstr); 875 int msw = paint.fontMetrics().width(maxstr);
876 876
877 QMatrix m; 877 QMatrix m;
918 918
919 if (i > symin) { 919 if (i > symin) {
920 if (paint.fontMetrics().height() >= h) { 920 if (paint.fontMetrics().height() >= h) {
921 if (h >= defaultFontHeight * 0.8) { 921 if (h >= defaultFontHeight * 0.8) {
922 QFont tf = paint.font(); 922 QFont tf = paint.font();
923 tf.setPixelSize(h * 0.8); 923 tf.setPixelSize(int(h * 0.8));
924 paint.setFont(tf); 924 paint.setFont(tf);
925 } else { 925 } else {
926 continue; 926 continue;
927 } 927 }
928 } 928 }