Mercurial > hg > svgui
comparison layer/Colour3DPlotRenderer.h @ 1094:8a815776151c spectrogram-minor-refactor
Split out cache rendering functions and some fixes to calculations
author | Chris Cannam |
---|---|
date | Thu, 07 Jul 2016 19:18:31 +0100 |
parents | c8c747783110 |
children | ba62684a4512 |
comparison
equal
deleted
inserted
replaced
1093:cd22f74dc159 | 1094:8a815776151c |
---|---|
61 colourScale(ColourScale::Parameters()), | 61 colourScale(ColourScale::Parameters()), |
62 normalization(ColumnOp::NoNormalization), | 62 normalization(ColumnOp::NoNormalization), |
63 binDisplay(AllBins), | 63 binDisplay(AllBins), |
64 binScale(LinearBinScale), | 64 binScale(LinearBinScale), |
65 alwaysOpaque(false), | 65 alwaysOpaque(false), |
66 interpolate(false), | 66 interpolate(false), //!!! separate out x-interpolate and y-interpolate? the spectrogram actually does (or used to) |
67 invertVertical(false) { } | 67 invertVertical(false) { } |
68 | 68 |
69 ColourScale colourScale; // complete ColourScale object by value | 69 ColourScale colourScale; // complete ColourScale object by value |
70 ColumnOp::Normalization normalization; | 70 ColumnOp::Normalization normalization; |
71 BinDisplay binDisplay; | 71 BinDisplay binDisplay; |
165 // carried out by repainting to cache (via the draw buffer) any | 165 // carried out by repainting to cache (via the draw buffer) any |
166 // area that is being requested but is not valid in the cache, and | 166 // area that is being requested but is not valid in the cache, and |
167 // then repainting from cache to the requested painter. | 167 // then repainting from cache to the requested painter. |
168 ScrollableImageCache m_cache; | 168 ScrollableImageCache m_cache; |
169 | 169 |
170 bool useBinResolutionForDrawBuffer(LayerGeometryProvider *) const; | |
171 | |
170 RenderResult render(LayerGeometryProvider *v, | 172 RenderResult render(LayerGeometryProvider *v, |
171 QPainter &paint, QRect rect, bool timeConstrained); | 173 QPainter &paint, QRect rect, bool timeConstrained); |
172 void renderToCache(LayerGeometryProvider *v, int x0, int repaintWidth, | 174 void renderToCachePixelResolution(LayerGeometryProvider *v, int x0, |
173 bool rightToLeft, bool timeConstrained); | 175 int repaintWidth, bool rightToLeft, |
176 bool timeConstrained); | |
177 void renderToCacheBinResolution(LayerGeometryProvider *v, int x0, | |
178 int repaintWidth); | |
174 int renderDrawBuffer(int w, int h, | 179 int renderDrawBuffer(int w, int h, |
175 const std::vector<int> &binforx, | 180 const std::vector<int> &binforx, |
176 const std::vector<double> &binfory, | 181 const std::vector<double> &binfory, |
177 bool usePeaksCache, | 182 bool usePeaksCache, |
178 bool rightToLeft, | 183 bool rightToLeft, |