#ifndef COLORMAP_H #define COLORMAP_H #include #include #include #include #include "colorscale.h" class Colormap { public: static const int SAMPLES = 128; enum Orientation { Horizontal, Vertical }; Colormap(); ~Colormap(); void update(); void setOrientation(Orientation orientation); Orientation orientation() const { return m_orientation; } nod::signal)> colorScaleChanged; nod::signal orientationChanged; void setColorScale(std::shared_ptr scale); // QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); private: // QSGNode *newSceneGraph(); // QSGDynamicTexture *m_texture; bool m_shouldUpdateTexture, m_shouldUpdateOrientation; Orientation m_orientation; std::vector m_cmap; }; #endif // COLORMAP_H