lemon/color.h
changeset 2165 947d36fb3b49
parent 1993 2115143eceea
child 2172 4b25e7003868
equal deleted inserted replaced
1:0b20c6a9ca96 2:4c119fb3cd1b
    54 public:
    54 public:
    55   ///Default constructor
    55   ///Default constructor
    56   Color() {}
    56   Color() {}
    57   ///Constructor
    57   ///Constructor
    58   Color(double r,double g,double b) :_r(r),_g(g),_b(b) {};
    58   Color(double r,double g,double b) :_r(r),_g(g),_b(b) {};
    59   ///Returns the red component
    59   ///Set the red component
    60   double & red() {return _r;}
    60   double & red() {return _r;}
    61   ///Returns the red component
    61   ///Return the red component
    62   const double & red() const {return _r;}
    62   const double & red() const {return _r;}
    63   ///Returns the green component
    63   ///Set the green component
    64   double & green() {return _g;}
    64   double & green() {return _g;}
    65   ///Returns the green component
    65   ///Return the green component
    66   const double & green() const {return _g;}
    66   const double & green() const {return _g;}
    67   ///Returns the blue component
    67   ///Set the blue component
    68   double & blue() {return _b;}
    68   double & blue() {return _b;}
    69   ///Returns the blue component
    69   ///Return the blue component
    70   const double & blue() const {return _b;}
    70   const double & blue() const {return _b;}
    71   ///Set the color components
    71   ///Set the color components
    72   void set(double r,double g,double b) { _r=r;_g=g;_b=b; };
    72   void set(double r,double g,double b) { _r=r;_g=g;_b=b; };
    73 };
    73 };
    74 
    74