diff options
Diffstat (limited to 'plugingui/colour.h')
-rw-r--r-- | plugingui/colour.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugingui/colour.h b/plugingui/colour.h index 3a135fc..232b0b9 100644 --- a/plugingui/colour.h +++ b/plugingui/colour.h @@ -54,4 +54,13 @@ private: std::array<float, 4> data; }; +struct ColourHasher +{ + // TODO: replace by something reasonable + std::size_t operator()(const Colour& colour) const + { + return 7*colour.red() + 11*colour.green() + 13*colour.blue() + 17*colour.alpha(); + } +}; + } // GUI:: |