diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-11 14:29:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-11 14:29:55 +0100 |
| commit | b655bd3359e9a014da68cd9f61e2a5b1d233247d (patch) | |
| tree | 42ab16fdc9621fd0314a71f051804cdacd1cb823 /src/lib/types.cc | |
| parent | e64acff7da897cd03d88aa9e8e21682545a61cc2 (diff) | |
| parent | 2514ffcd1adcca4fc8e3db894afb5cdc6c857e94 (diff) | |
Merge branch '1.0' of /home/carl/git/dvdomatic into 1.0
Diffstat (limited to 'src/lib/types.cc')
| -rw-r--r-- | src/lib/types.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/lib/types.cc b/src/lib/types.cc index 78cb4cd64..035c8363d 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -32,25 +32,3 @@ bool operator!= (Crop const & a, Crop const & b) return !(a == b); } - -/** @param other A Rect. - * @return The intersection of this with `other'. - */ -dcpomatic::Rect -dcpomatic::Rect::intersection (Rect const & other) const -{ - int const tx = max (x, other.x); - int const ty = max (y, other.y); - - return Rect ( - tx, ty, - min (x + width, other.x + other.width) - tx, - min (y + height, other.y + other.height) - ty - ); -} - -bool -dcpomatic::Rect::contains (Position p) const -{ - return (p.x >= x && p.x <= (x + width) && p.y >= y && p.y <= (y + height)); -} |
