MCPcopy Create free account
hub / github.com/Snapchat/Valdi / intersects

Method intersects

valdi/src/valdi/runtime/Views/Frame.cpp:131–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131bool 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
151bool Frame::isEmpty() const {
152 return x == 0 && y == 0 && width == 0 && height == 0;

Callers 1

doUpdateVisibilityMethod · 0.45

Calls 2

getRightMethod · 0.80
getBottomMethod · 0.80

Tested by

no test coverage detected