From a0adf063da93bdf0666df3556f2d965cca9b5032 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 1 Jan 2016 16:00:17 +0100 Subject: [PATCH] Changed: Added isGray() method to CGRBA --- code/nel/include/nel/misc/rgba.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/nel/include/nel/misc/rgba.h b/code/nel/include/nel/misc/rgba.h index db9ed892a..7929b4545 100644 --- a/code/nel/include/nel/misc/rgba.h +++ b/code/nel/include/nel/misc/rgba.h @@ -146,6 +146,14 @@ public: */ uint8 toGray() const; + /** + * Color is gray + */ + bool isGray() const + { + return R == G && G == B; + } + /** * Get a 16 bits 565 pixel. */