aboutsummaryrefslogtreecommitdiff
path: root/divergentcolorscale.h
blob: f782f36aecf2e0498d77f3f35024a4143c0a073d (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 Color &color1,
                        const Color &colorMiddle,
                        const Color &color2);

    enum BuiltinDivergentColorScale {
        RedGrayBlue
    };

    Color color(float t) const;

    static DivergentColorScale builtin(BuiltinDivergentColorScale);
    static DivergentColorScale *builtin(BuiltinDivergentColorScale, void *);
};

#endif // DIVERGENTCOLORSCALE_H