X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/98871795be266e4ea8b4662737ac618ebee0fb79..0e3cd5a760199d782d22e53ec20be11ba0e23e55:/Model/include/rgb.h?ds=sidebyside diff --git a/Model/include/rgb.h b/Model/include/rgb.h index 4a851e0..7eebfb1 100644 --- a/Model/include/rgb.h +++ b/Model/include/rgb.h @@ -3,7 +3,7 @@ #ifndef _RGB_H_ #define _RGB_H_ -typedef unsigned char color; +typedef unsigned int color; /** Representación de un color en codificación RGB */ class RGB { @@ -23,6 +23,10 @@ public: return (*this); } + bool operator == (const RGB &c) { + return ((r()==c.r()) && (g() == c.g()) && (b() == c.b())); + } + color r() const { return my_r; } color g() const { return my_g; } color b() const { return my_b; }