summaryrefslogtreecommitdiffstats
path: root/common/common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-22 14:17:46 +0200
committerwm4 <wm4@nowhere>2020-05-22 14:17:46 +0200
commit1be32529b161d6c67d51004062ee4e6280036fb3 (patch)
treecc1b665725adbf6e1af21c6cfb8140831eb2c67d /common/common.h
parent320fa3bbe73c57e2ba5633a865b6997c1901b4b2 (diff)
downloadmpv-1be32529b161d6c67d51004062ee4e6280036fb3.tar.bz2
mpv-1be32529b161d6c67d51004062ee4e6280036fb3.tar.xz
common: add helper for subtracting rectangles
Not sure if generally useful; the following commit uses it.
Diffstat (limited to 'common/common.h')
-rw-r--r--common/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/common.h b/common/common.h
index 8dbb304625..af01e38e10 100644
--- a/common/common.h
+++ b/common/common.h
@@ -87,6 +87,8 @@ void mp_rect_union(struct mp_rect *rc, const struct mp_rect *src);
bool mp_rect_intersection(struct mp_rect *rc, const struct mp_rect *rc2);
bool mp_rect_contains(struct mp_rect *rc, int x, int y);
bool mp_rect_equals(struct mp_rect *rc1, struct mp_rect *rc2);
+int mp_rect_subtract(const struct mp_rect *rc1, const struct mp_rect *rc2,
+ struct mp_rect res_array[4]);
unsigned int mp_log2(uint32_t v);
uint32_t mp_round_next_power_of_2(uint32_t v);