From 3ce49858c6859fccc2e4d35839c34685348790d1 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Wed, 2 Mar 2016 15:47:24 -0300 Subject: Improvements related to ColorScale and screenshots. * ColorScale: now a pointer whenever needed. main() takes care of updating extents * New class DivergentColorScale: works specifically for divergent scales, always has 3 colors as input: negative values, 0, positive values * ManipulationHandler: ProjectionHistory no longer needed --- divergentcolorscale.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 divergentcolorscale.h (limited to 'divergentcolorscale.h') diff --git a/divergentcolorscale.h b/divergentcolorscale.h new file mode 100644 index 0000000..9ab3be6 --- /dev/null +++ b/divergentcolorscale.h @@ -0,0 +1,24 @@ +#ifndef DIVERGENTCOLORSCALE_H +#define DIVERGENTCOLORSCALE_H + +#include "colorscale.h" + +class DivergentColorScale + : public ColorScale +{ +public: + DivergentColorScale(const QColor &color1, + const QColor &colorMiddle, + const QColor &color2); + + enum BuiltinDivergentColorScale { + RedGrayBlue + }; + + QColor color(float t) const; + + static DivergentColorScale builtin(BuiltinDivergentColorScale); + static DivergentColorScale *builtin(BuiltinDivergentColorScale, void *); +}; + +#endif // DIVERGENTCOLORSCALE_H -- cgit v1.2.3