diff layer/Colour3DPlotRenderer.cpp @ 1096:6288f1b5f49b spectrogram-minor-refactor

Far more pragmatic update strategy
author Chris Cannam
date Mon, 11 Jul 2016 14:37:03 +0100
parents ba62684a4512
children 92ac1fce7102
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp	Mon Jul 11 10:38:23 2016 +0100
+++ b/layer/Colour3DPlotRenderer.cpp	Mon Jul 11 14:37:03 2016 +0100
@@ -42,6 +42,22 @@
     return render(v, paint, rect, true);
 }
 
+QRect
+Colour3DPlotRenderer::getLargestUncachedRect()
+{
+    int h = m_cache.getSize().height();
+
+    QRect areaLeft(0, 0, m_cache.getValidLeft(), h);
+    QRect areaRight(m_cache.getValidRight(), 0,
+                    m_cache.getSize().width() - m_cache.getValidRight(), h);
+
+    if (areaRight.width() > areaLeft.width()) {
+        return areaRight;
+    } else {
+        return areaLeft;
+    }
+}
+
 Colour3DPlotRenderer::RenderResult
 Colour3DPlotRenderer::render(LayerGeometryProvider *v,
                              QPainter &paint, QRect rect, bool timeConstrained)
@@ -184,8 +200,6 @@
 
     //!!! todo: transparent style from Colour3DPlot
 
-    //!!! todo: bin boundary alignment when in BinResolution
-
     //!!! todo: view magnitudes / normalise visible area
 
     //!!! todo: alter documentation for view mag stuff (cached paints