aboutsummaryrefslogtreecommitdiff
path: root/divergentcolorscale.h
blob: 9ab3be62eddfcbb7d3b6c7e35f31588ac991b08f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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