diff layer/RegionLayer.cpp @ 1537:4f8c72adbf43

Clarify naming of some view-related methods. Rename LayerGeometryProvider::getValueExtents to getVisibleExtentsForUnit, and View::getTextLabelHeight to getTextLabelYCoord. Add View::getVisibleExtentsForAnyUnit to be used to determine which unit to adopt in a new e.g. box layer.
author Chris Cannam
date Tue, 15 Oct 2019 11:40:56 +0100
parents 37df1530519d
children e6362cf5ff1d
line wrap: on
line diff
--- a/layer/RegionLayer.cpp	Tue Oct 15 09:32:24 2019 +0100
+++ b/layer/RegionLayer.cpp	Tue Oct 15 11:40:56 2019 +0100
@@ -608,7 +608,7 @@
 
     if (m_verticalScale == AutoAlignScale) {
 
-        if (!v->getValueExtents(queryUnits, min, max, log)) {
+        if (!v->getVisibleExtentsForUnit(queryUnits, min, max, log)) {
 
             min = model->getValueMinimum();
             max = model->getValueMaximum();
@@ -1027,7 +1027,7 @@
                     - paint.fontMetrics().descent();
             } else {
                 labelX = x + 5;
-                labelY = v->getTextLabelHeight(this, paint);
+                labelY = v->getTextLabelYCoord(this, paint);
                 if (labelX < nextLabelMinX) {
                     if (lastLabelY < v->getPaintHeight()/2) {
                         labelY = lastLabelY + fontHeight;