1
mirror of https://github.com/mpv-player/mpv synced 2024-10-30 04:46:41 +01:00

common: add some helper macros

This commit is contained in:
wm4 2014-03-07 12:46:22 +01:00
parent 52428ece91
commit 9cc9d19eee

View File

@ -70,6 +70,9 @@ struct mp_rect {
int x1, y1;
};
#define mp_rect_w(r) ((r).x1 - (r).x0)
#define mp_rect_h(r) ((r).y1 - (r).y0)
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);