summaryrefslogtreecommitdiff
path: root/src/lib/util.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-27 22:30:35 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-27 22:30:35 +0100
commit6427e9dcb2cd239dcd5a392aac847df47f9875d9 (patch)
treeeb69053b6b103db808bfeaf1d07fc9c729fa533f /src/lib/util.h
parent423928e4a0c9294f7e7da30030f00e3fc09cdf14 (diff)
Use a Crop struct and use it to speed up cropping a bit.
Diffstat (limited to 'src/lib/util.h')
-rw-r--r--src/lib/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/util.h b/src/lib/util.h
index 1faef0cd3..16afb7bb6 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -103,6 +103,19 @@ struct Size
int height;
};
+struct Crop
+{
+ Crop () : left (0), right (0), top (0), bottom (0) {}
+
+ int left;
+ int right;
+ int top;
+ int bottom;
+};
+
+extern bool operator== (Crop const & a, Crop const & b);
+extern bool operator!= (Crop const & a, Crop const & b);
+
struct Position
{
Position ()