Mercurial > hg > svgui
comparison layer/Colour3DPlotRenderer.h @ 1121:d930ff725f64 spectrogram-minor-refactor
Wiring through the magnitude range updates
author | Chris Cannam |
---|---|
date | Fri, 22 Jul 2016 12:17:55 +0100 |
parents | be5b91ec81a0 |
children | 94370157b265 |
comparison
equal
deleted
inserted
replaced
1120:65cdaf8d6b50 | 1121:d930ff725f64 |
---|---|
161 * cache, it cannot have been rendered since the cache was | 161 * cache, it cannot have been rendered since the cache was |
162 * cleared). | 162 * cleared). |
163 * | 163 * |
164 * Returns an empty QRect if the cache is entirely valid. | 164 * Returns an empty QRect if the cache is entirely valid. |
165 */ | 165 */ |
166 QRect getLargestUncachedRect(); | 166 QRect getLargestUncachedRect(const LayerGeometryProvider *v); |
167 | 167 |
168 /** | 168 /** |
169 * Return true if the rendering will be opaque. This may be used | 169 * Return true if the rendering will be opaque. This may be used |
170 * by the calling layer to determine whether it can scroll | 170 * by the calling layer to determine whether it can scroll |
171 * directly without regard to any other layers beneath. | 171 * directly without regard to any other layers beneath. |
182 // at view height (not model height) and is cleared and repainted | 182 // at view height (not model height) and is cleared and repainted |
183 // on each fragment render. The only reason it's stored as a data | 183 // on each fragment render. The only reason it's stored as a data |
184 // member is to avoid reallocation. | 184 // member is to avoid reallocation. |
185 QImage m_drawBuffer; | 185 QImage m_drawBuffer; |
186 | 186 |
187 // A temporary store of magnitude ranges per-column, used when | |
188 // rendering to the draw buffer. This always has the same length | |
189 // as the width of the draw buffer, and the x coordinates of the | |
190 // two containers are equivalent. | |
191 std::vector<MagnitudeRange> m_magRanges; | |
192 | |
187 // The image cache is our persistent record of the visible | 193 // The image cache is our persistent record of the visible |
188 // area. It is always the same size as the view (i.e. the paint | 194 // area. It is always the same size as the view (i.e. the paint |
189 // size reported by the LayerGeometryProvider) and is scrolled and | 195 // size reported by the LayerGeometryProvider) and is scrolled and |
190 // partially repainted internally as appropriate. A render request | 196 // partially repainted internally as appropriate. A render request |
191 // is carried out by repainting to cache (via the draw buffer) any | 197 // is carried out by repainting to cache (via the draw buffer) any |
203 ScrollableMagRangeCache m_magCache; | 209 ScrollableMagRangeCache m_magCache; |
204 | 210 |
205 RenderResult render(const LayerGeometryProvider *v, | 211 RenderResult render(const LayerGeometryProvider *v, |
206 QPainter &paint, QRect rect, bool timeConstrained); | 212 QPainter &paint, QRect rect, bool timeConstrained); |
207 | 213 |
208 void renderDirectTranslucent(const LayerGeometryProvider *v, | 214 MagnitudeRange renderDirectTranslucent(const LayerGeometryProvider *v, |
209 QPainter &paint, QRect rect); | 215 QPainter &paint, QRect rect); |
210 | 216 |
211 void renderToCachePixelResolution(const LayerGeometryProvider *v, int x0, | 217 void renderToCachePixelResolution(const LayerGeometryProvider *v, int x0, |
212 int repaintWidth, bool rightToLeft, | 218 int repaintWidth, bool rightToLeft, |
213 bool timeConstrained); | 219 bool timeConstrained); |
214 | 220 |