| 180 | return (rc_intersect(frame, &tmp)); |
| 181 | } |
| 182 | static void |
| 183 | gc_combine(GRECT *frame, GRECT *test) |
| 184 | { |
| 185 | if (!frame || !test) |
| 186 | return; |
| 187 | if (frame->g_x > test->g_x) { |
| 188 | frame->g_w += frame->g_x - test->g_x; |
| 189 | frame->g_x = test->g_x; |
| 190 | } |
| 191 | if (frame->g_y > test->g_y) { |
| 192 | frame->g_h += frame->g_y - test->g_y; |
| 193 | frame->g_y = test->g_y; |
| 194 | } |
| 195 | if (frame->g_x + frame->g_w < test->g_x + test->g_w) |
| 196 | frame->g_w = test->g_x + test->g_w - frame->g_x; |
| 197 | if (frame->g_y + frame->g_h < test->g_y + test->g_h) |
| 198 | frame->g_h = test->g_y + test->g_h - frame->g_y; |
| 199 | } |
| 200 | static long |
| 201 | gc_area(GRECT *area) |
| 202 | { |