X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/98871795be266e4ea8b4662737ac618ebee0fb79..6dd05bd84faebf6d7e9e36a0f1dd040ef9fb24a3:/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; }