1 #include "evas_common.h"
2 #include "evas_private.h"
5 evas_rects_return_difference_rects(Evas_Rectangles *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh)
7 unsigned int available = 0;
9 if (!RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh))
11 evas_add_rect(rects, x, y, w, h);
12 evas_add_rect(rects, xx, yy, ww, hh);
16 int x1[4], y1[4], i, j;
17 Evas_Rectangles tmp = { 0, 0, NULL };
29 if ((x + w) < (xx + ww))
49 if ((y + h) < (yy + hh))
59 for (j = 0; j < 3; j++)
61 for (i = 0; i < 3; i++)
68 tw = x1[i + 1] - x1[i];
69 th = y1[j + 1] - y1[j];
71 intsec1 = (RECTS_INTERSECT(tx, ty, tw, th, x, y, w, h));
72 intsec2 = (RECTS_INTERSECT(tx, ty, tw, th, xx, yy, ww, hh));
73 if (intsec1 ^ intsec2)
75 evas_add_rect(rects, tx, ty, tw, th);
79 /* if (tmp.count > 0) */
83 /* for (i = 0; i < tmp.count; ++i) */
85 /* if ((tmp.array[i].w > 0) && (tmp.array[i].h > 0)) */
87 /* int intsec1, intsec2; */
89 /* intsec1 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, x, y, w, h)); */
90 /* intsec2 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, xx, yy, ww, hh)); */
91 /* if (intsec1 ^ intsec2) */
93 /* evas_add_rect(rects, tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h); */
97 /* free(tmp.array); */