Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.cpp @ 1113:261a00010918 spectrogram-minor-refactor
Consts and willRenderOpaque
author | Chris Cannam |
---|---|
date | Tue, 19 Jul 2016 14:49:46 +0100 |
parents | edbe229860ac |
children | a42e5a3c63ef |
comparison
equal
deleted
inserted
replaced
1112:d578b685d912 | 1113:261a00010918 |
---|---|
612 Colour3DPlotLayer::isLayerScrollable(const LayerGeometryProvider *v) const | 612 Colour3DPlotLayer::isLayerScrollable(const LayerGeometryProvider *v) const |
613 { | 613 { |
614 if (m_normalizeVisibleArea) { | 614 if (m_normalizeVisibleArea) { |
615 return false; | 615 return false; |
616 } | 616 } |
617 //!!! if (shouldPaintDenseIn(v)) { | 617 if (getRenderer(v)->willRenderOpaque(v)) { |
618 // return true; | 618 return true; |
619 // } | 619 } |
620 QPoint discard; | 620 QPoint discard; |
621 return !v->shouldIlluminateLocalFeatures(this, discard); | 621 return !v->shouldIlluminateLocalFeatures(this, discard); |
622 } | 622 } |
623 | 623 |
624 bool | 624 bool |
722 return new LinearRangeMapper(0, m_model->getHeight(), | 722 return new LinearRangeMapper(0, m_model->getHeight(), |
723 0, m_model->getHeight(), ""); | 723 0, m_model->getHeight(), ""); |
724 } | 724 } |
725 | 725 |
726 double | 726 double |
727 Colour3DPlotLayer::getYForBin(LayerGeometryProvider *v, double bin) const | 727 Colour3DPlotLayer::getYForBin(const LayerGeometryProvider *v, double bin) const |
728 { | 728 { |
729 double y = bin; | 729 double y = bin; |
730 if (!m_model) return y; | 730 if (!m_model) return y; |
731 double mn = 0, mx = m_model->getHeight(); | 731 double mn = 0, mx = m_model->getHeight(); |
732 getDisplayExtents(mn, mx); | 732 getDisplayExtents(mn, mx); |
740 } | 740 } |
741 return y; | 741 return y; |
742 } | 742 } |
743 | 743 |
744 double | 744 double |
745 Colour3DPlotLayer::getBinForY(LayerGeometryProvider *v, double y) const | 745 Colour3DPlotLayer::getBinForY(const LayerGeometryProvider *v, double y) const |
746 { | 746 { |
747 double bin = y; | 747 double bin = y; |
748 if (!m_model) return bin; | 748 if (!m_model) return bin; |
749 double mn = 0, mx = m_model->getHeight(); | 749 double mn = 0, mx = m_model->getHeight(); |
750 getDisplayExtents(mn, mx); | 750 getDisplayExtents(mn, mx); |
1062 } | 1062 } |
1063 return false; | 1063 return false; |
1064 } | 1064 } |
1065 */ | 1065 */ |
1066 Colour3DPlotRenderer * | 1066 Colour3DPlotRenderer * |
1067 Colour3DPlotLayer::getRenderer(LayerGeometryProvider *v) const | 1067 Colour3DPlotLayer::getRenderer(const LayerGeometryProvider *v) const |
1068 { | 1068 { |
1069 if (m_renderers.find(v->getId()) == m_renderers.end()) { | 1069 if (m_renderers.find(v->getId()) == m_renderers.end()) { |
1070 | 1070 |
1071 Colour3DPlotRenderer::Sources sources; | 1071 Colour3DPlotRenderer::Sources sources; |
1072 sources.verticalBinLayer = this; | 1072 sources.verticalBinLayer = this; |