| 129 | } |
| 130 | |
| 131 | bool Frame::intersects(const Valdi::Frame& otherFrame) const { |
| 132 | if (x >= otherFrame.getRight()) { |
| 133 | return false; |
| 134 | } |
| 135 | |
| 136 | if (y >= otherFrame.getBottom()) { |
| 137 | return false; |
| 138 | } |
| 139 | |
| 140 | if (getRight() <= otherFrame.x) { |
| 141 | return false; |
| 142 | } |
| 143 | |
| 144 | if (getBottom() <= otherFrame.y) { |
| 145 | return false; |
| 146 | } |
| 147 | |
| 148 | return true; |
| 149 | } |
| 150 | |
| 151 | bool Frame::isEmpty() const { |
| 152 | return x == 0 && y == 0 && width == 0 && height == 0; |
no test coverage detected