blob: 40f5e4e4de24ade439f3a33de721da72e0fe1f27 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#ifndef rect_h
#define rect_h
typedef struct Rect {
int x, y, w, h;
} Rect;
int rects_overlap(const Rect* a, const Rect* b);
int point_rect_overlap(const Rect* r, int px, int py);
Rect* rect_clip(Rect* r, const Rect* c);
Rect* rect_clipr(Rect* r, const int* c);
Rect* rect_clips(Rect* r, Rect* s, const Rect* c);
Rect* rect_clipsr(Rect* r, Rect* s, const int* c);
#endif
|