X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/98871795be266e4ea8b4662737ac618ebee0fb79..cba39b63dc2c5ba1ee85f3db718adf0e8075c88f:/Model/include/rgb.h 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; }