diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-14 21:06:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-14 21:06:47 +0100 |
| commit | 009a58293bf2e9727d544d1a2648422cc395d81e (patch) | |
| tree | c581d457104195a0219a0197c523981756bf9ecd /src/lib/util.h | |
| parent | b5001080a3e5b414f6cad1c52926ed757f2d8574 (diff) | |
| parent | ade28a703b15af710161faa017cddf95d66c4118 (diff) | |
Merge branch 'subs'
Diffstat (limited to 'src/lib/util.h')
| -rw-r--r-- | src/lib/util.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/util.h b/src/lib/util.h index 3eac06e97..244c01855 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -121,9 +121,35 @@ 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); +extern int round_up (int, int); /** @class Socket * @brief A class to wrap a boost::asio::ip::tcp::socket with some things |
