25 #include <tulip/Observable.h>
26 #include <tulip/Color.h>
58 class TLP_SCOPE ColorScale :
public Observable {
66 ColorScale(
const bool gradient =
true);
73 ColorScale(
const std::vector<Color> &colors,
const bool gradient =
true);
76 ColorScale(
const ColorScale& scale);
77 ColorScale& operator=(
const ColorScale& scale);
78 virtual ~ColorScale();
83 unsigned int getStopsCount() {
84 return colorMap.size();
93 virtual void setColorScale(
const std::vector<Color> colors,
const bool gradient =
true);
101 virtual void setColorAtPos(
const float pos,
const Color &color);
109 virtual Color getColorAtPos(
const float pos)
const;
114 bool colorScaleInitialized()
const {
115 return colorScaleSet;
121 std::map<float, Color> getColorMap()
const {
129 void setColorMap(
const std::map<float, Color>& colorMap);
133 bool isGradient()
const {
139 std::map<float, Color> colorMap;