21 #ifndef GLCOLORSCALE_H_
22 #define GLCOLORSCALE_H_
24 #include <tulip/Observable.h>
25 #include <tulip/GlSimpleEntity.h>
26 #include <tulip/Color.h>
33 class TLP_GL_SCOPE GlColorScale :
public GlSimpleEntity,
public Observable {
36 enum Orientation { Horizontal, Vertical };
38 GlColorScale(ColorScale *colorScale,
const Coord &baseCoord,
const float length,
39 const float thickness, Orientation orientation);
41 ~GlColorScale()
override;
49 Color getColorAtPos(Coord pos);
51 void draw(
float lod, Camera *camera)
override;
53 void translate(
const Coord &move)
override;
55 Coord getBaseCoord()
const {
59 float getThickness()
const {
63 float getLength()
const {
67 GlPolyQuad *getColorScalePolyQuad()
const {
68 return colorScalePolyQuad;
71 void setColorScale(ColorScale *scale);
73 ColorScale *getColorScale() {
77 void getXML(std::string &)
override {}
79 void setWithXML(
const std::string &,
unsigned int &)
override {}
82 void treatEvent(
const Event &)
override;
87 ColorScale *colorScale;
89 float length, thickness;
90 GlPolyQuad *colorScalePolyQuad;
91 Orientation orientation;