summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2020-06-02 20:31:24 +1000
committerGitHub <noreply@github.com>2020-06-02 20:31:24 +1000
commite2a5fdee3bbd7223ba7e7013e90486723a7de15c (patch)
tree54a97da55050726761810f8b0855f92fea82deb7 /include
parente97e86648355cbe61c6249483c6f2a5d1b41714f (diff)
parent0f4ea6cc35b4c653a156d9025b3125952dd04ae4 (diff)
downloadredot-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.hpp18
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();