comparison layer/SpectrumLayer.h @ 1383:86f319dd6ab9 spectrogramparam

Switch spectrum to antialiased drawing with considerable speedup for the dense areas; take horizontal scale height into account when rendering slice layer height
author Chris Cannam
date Wed, 07 Nov 2018 15:59:10 +0000
parents 2df1af7ac752
children fc3d89f88690
comparison
equal deleted inserted replaced
1382:2df1af7ac752 1383:86f319dd6ab9
26 #include "HorizontalScaleProvider.h" 26 #include "HorizontalScaleProvider.h"
27 27
28 #include <QColor> 28 #include <QColor>
29 #include <QMutex> 29 #include <QMutex>
30 30
31 class FFTModel;
32
33 class SpectrumLayer : public SliceLayer, 31 class SpectrumLayer : public SliceLayer,
34 public HorizontalScaleProvider 32 public HorizontalScaleProvider
35 { 33 {
36 Q_OBJECT 34 Q_OBJECT
37 35
44 42
45 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos, 43 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos,
46 std::vector<QRect> &extents) const override; 44 std::vector<QRect> &extents) const override;
47 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override; 45 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override;
48 46
49 virtual int getHorizontalScaleHeight(LayerGeometryProvider *, QPainter &) const; 47 virtual int getHorizontalScaleHeight(LayerGeometryProvider *, QPainter &) const override;
50 virtual void paintHorizontalScale(LayerGeometryProvider *, QPainter &, int xorigin) const; 48 virtual void paintHorizontalScale(LayerGeometryProvider *, QPainter &, int xorigin) const;
51 49
52 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; 50 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
53 51
54 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; 52 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;