Thumbs sort of have subs.
[dcpomatic.git] / src / lib / util.h
index ed13cd43cba51bf95f2cad930381bf81f24d7d5a..e1ad7fd642707ee546b8374e4dc879f9c792e871 100644 (file)
@@ -121,6 +121,31 @@ struct Position
        int y;
 };
 
+/** A rectangle */
+struct Rectangle
+{
+       Rectangle ()
+               : x (0)
+               , y (0)
+               , w (0)
+               , h (0)
+       {}
+
+       Rectangle (int x_, int y_, int w_, int h_)
+               : x (x_)
+               , y (y_)
+               , w (w_)
+               , h (h_)
+       {}
+
+       int x;
+       int y;
+       int w;
+       int h;
+
+       Rectangle intersection (Rectangle const & other) const;
+};
+
 extern std::string crop_string (Position, Size);
 extern int dcp_audio_sample_rate (int);
 extern std::string colour_lut_index_to_name (int index);