* Check if a point is inside a region. */
| 60 | * Check if a point is inside a region. |
| 61 | */ |
| 62 | boolean |
| 63 | inside_region(NhRegion *reg, int x, int y) |
| 64 | { |
| 65 | int i; |
| 66 | |
| 67 | if (reg == (NhRegion *) 0 || !inside_rect(&(reg->bounding_box), x, y)) |
| 68 | return FALSE; |
| 69 | for (i = 0; i < reg->nrects; i++) |
| 70 | if (inside_rect(&(reg->rects[i]), x, y)) |
| 71 | return TRUE; |
| 72 | return FALSE; |
| 73 | } |
| 74 | |
| 75 | /* |
| 76 | * Create a region. It does not activate it. |
no test coverage detected