summaryrefslogtreecommitdiff
path: root/plugingui/colour.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2019-05-31 15:50:24 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-04-09 16:44:41 +0200
commitcf49b305a0c9e10a8b08ac626019f1502c5f12ee (patch)
tree9d85aa4c396d1dd3e9ea7badce4ff1b581bf1e70 /plugingui/colour.cc
parent22d2d946da85e513b67affc87dfef2b42ded3b27 (diff)
Stretched drumkit image test.
Diffstat (limited to 'plugingui/colour.cc')
-rw-r--r--plugingui/colour.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugingui/colour.cc b/plugingui/colour.cc
index 7fd649c..de740e9 100644
--- a/plugingui/colour.cc
+++ b/plugingui/colour.cc
@@ -79,4 +79,24 @@ bool Colour::operator!=(const Colour& other) const
return !(*this == other);
}
+Colour Colour::operator+(const Colour& other) const
+{
+ Colour c = *this;
+ c.pixel[0] += other.pixel[0];
+ c.pixel[1] += other.pixel[1];
+ c.pixel[2] += other.pixel[2];
+ c.pixel[3] += other.pixel[3];
+ return c;
+}
+
+Colour Colour::operator*(float v) const
+{
+ Colour c = *this;
+ c.pixel[0] *= v;
+ c.pixel[1] *= v;
+ c.pixel[2] *= v;
+ c.pixel[3] *= v;
+ return c;
+}
+
} // GUI::