Code

Fix fallback icon loading order for icons with legacy names.
[inkscape.git] / src / color-rgba.h
index 24bc63b521ec07464f320e1f6fd4f67cab0953fc..fc52b193dd007a10a99076ff6955832a31c21d7b 100644 (file)
@@ -1,7 +1,7 @@
 /** \file color-rgba.h
 
     A class to handle a RGBA color as one unit.
-    
+
     Authors:
       bulia byak <buliabyak@gmail.com>
 
@@ -12,6 +12,7 @@
 #ifndef SEEN_COLOR_RGBA_H
 #define SEEN_COLOR_RGBA_H
 
+#include <glib.h> // g_assert()
 #include <glib/gmessages.h>
 #include "libnr/nr-pixops.h"
 #include "decimal-round.h"
@@ -114,9 +115,13 @@ public:
     bool operator== (const ColorRGBA other) const {
         for (int i = 0; i < 4; i++) {
             if (_c[i] != other[i])
-                return FALSE;
+                return false;
         }
-        return TRUE;
+        return true;
+    }
+
+    bool operator!=(ColorRGBA const &o) const {
+        return !(*this == o);
     }
 
     /**
@@ -141,25 +146,7 @@ public:
         return ColorRGBA(returnval[0], returnval[1], returnval[2], returnval[3]);
     }
 
-   /**
-        \brief  Create a ColorRGBA with the inverse color of the current ColorRGBA
-
-        do 1 minus each color components (but not the alpha) and put it into \c _c.
-    */
-    ColorRGBA getInverse() const {
-        return ColorRGBA( (1.0 - _c[0]), (1.0 - _c[1]), (1.0 - _c[2]), _c[3] );
-    }
-
-   /**
-        \brief  Create a ColorRGBA with the inverse color of a given ColorRGBA
-
-        do 1 minus each color components (but not the alpha) and put it into \c _c.
-    */
-    ColorRGBA getInverse(const ColorRGBA ref) const {
-        return getInverse(ref);
-    }
-
-   /**
+    /**
         \brief  Give the rgba32 "unsigned int" representation of the color
 
         round each components*255 and combine them (RRGGBBAA).