diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-10 20:35:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-10 20:35:05 +0100 |
| commit | ed70b4faf0f53b106aebd4b9195ccc81da97880e (patch) | |
| tree | 03ccbe558fbcc4165115e89212692ebcc0fda019 /src/lib/util.h | |
| parent | cc4a67b7eb8ecaed076e261960848f70e3e741af (diff) | |
Thumbs sort of have subs.
Diffstat (limited to 'src/lib/util.h')
| -rw-r--r-- | src/lib/util.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/util.h b/src/lib/util.h index ed13cd43c..e1ad7fd64 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -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); |
