summaryrefslogtreecommitdiffstats
path: root/core/color.h
diff options
context:
space:
mode:
authorbncastle <bncastle@pixelbytestudios.com>2017-09-11 15:35:59 -0400
committerbncastle <bncastle@pixelbytestudios.com>2017-09-16 13:09:49 -0400
commit9d9cfc6f61a8bad7714f576ea9eb95a18d18b4f6 (patch)
tree3a4e013f957b7cc1e8990329642c092d36c794f3 /core/color.h
parentf2d88d81317c9a092ce57f13bc99e67bf8148a5e (diff)
downloadredot-engine-9d9cfc6f61a8bad7714f576ea9eb95a18d18b4f6.tar.gz
Implement +,-,/, * and negate operators for Color type.
Diffstat (limited to 'core/color.h')
-rw-r--r--core/color.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/color.h b/core/color.h
index d3d5db09f9..972b6a1b33 100644
--- a/core/color.h
+++ b/core/color.h
@@ -67,6 +67,23 @@ struct Color {
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();
Color inverted() const;