diff options
| author | Bastiaan Olij <mux213@gmail.com> | 2020-06-02 20:31:24 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-02 20:31:24 +1000 |
| commit | e2a5fdee3bbd7223ba7e7013e90486723a7de15c (patch) | |
| tree | 54a97da55050726761810f8b0855f92fea82deb7 /include | |
| parent | e97e86648355cbe61c6249483c6f2a5d1b41714f (diff) | |
| parent | 0f4ea6cc35b4c653a156d9025b3125952dd04ae4 (diff) | |
| download | redot-cpp-e2a5fdee3bbd7223ba7e7013e90486723a7de15c.tar.gz | |
Merge pull request #406 from Zylann/color_operators
Added missing Color operators
Diffstat (limited to 'include')
| -rw-r--r-- | include/core/Color.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/core/Color.hpp b/include/core/Color.hpp index 0f93a55..e4116f2 100644 --- a/include/core/Color.hpp +++ b/include/core/Color.hpp @@ -5,6 +5,7 @@ #include <cmath> +#include "Defs.hpp" #include "String.hpp" namespace godot { @@ -73,6 +74,23 @@ public: return components[idx]; } + Color operator+(const Color &p_color) const; + void operator+=(const Color &p_color); + + Color operator-() const; + Color operator-(const Color &p_color) const; + void operator-=(const Color &p_color); + + Color operator*(const Color &p_color) const; + Color operator*(const real_t &rvalue) const; + void operator*=(const Color &p_color); + void operator*=(const real_t &rvalue); + + Color operator/(const Color &p_color) const; + Color operator/(const real_t &rvalue) const; + void operator/=(const Color &p_color); + void operator/=(const real_t &rvalue); + void invert(); void contrast(); |
