diff layer/TimeValueLayer.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 9ce6f69cd485
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Tue Oct 15 09:32:24 2019 +0100
+++ b/layer/TimeValueLayer.cpp	Tue Oct 15 11:40:56 2019 +0100
@@ -781,7 +781,7 @@
 
     if (shouldAutoAlign()) {
 
-        if (!v->getValueExtents(getScaleUnits(), min, max, log)) {
+        if (!v->getVisibleExtentsForUnit(getScaleUnits(), min, max, log)) {
             min = model->getValueMinimum();
             max = model->getValueMaximum();
         } else if (log) {
@@ -968,7 +968,7 @@
 
     int textY = 0;
     if (m_plotStyle == PlotSegmentation) {
-        textY = v->getTextLabelHeight(this, paint);
+        textY = v->getTextLabelYCoord(this, paint);
     } else {
         int originY = getYForValue(v, 0.f);
         if (originY > 0 && originY < v->getPaintHeight()) {