summaryrefslogtreecommitdiff
path: root/src/lib/bitmap_text.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-19 16:31:42 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-12 22:47:45 +0100
commitd9b0b7a6319b9faecfb58df7c3c772f440f09db0 (patch)
tree58097575a0773b2cdf4feac0ccec6c50a2b8e795 /src/lib/bitmap_text.cc
parent83f28a7c67794c0a9e48c8016db11585939e4d5d (diff)
Make PlayerText comparable.
Diffstat (limited to 'src/lib/bitmap_text.cc')
-rw-r--r--src/lib/bitmap_text.cc40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/lib/bitmap_text.cc b/src/lib/bitmap_text.cc
new file mode 100644
index 000000000..6e690b313
--- /dev/null
+++ b/src/lib/bitmap_text.cc
@@ -0,0 +1,40 @@
+/*
+ Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "bitmap_text.h"
+#include "image.h"
+
+bool
+operator== (BitmapText const & a, BitmapText const & b)
+{
+ if (!a.rectangle.equal(b.rectangle, 0.000001)) {
+ return false;
+ }
+
+ return *a.image == *b.image;
+}
+
+bool
+operator!= (BitmapText const & a, BitmapText const & b)
+{
+ return !(a == b);
+}
+
+