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

Method join

snap_drawing/src/snap_drawing/cpp/Utils/Geometry.cpp:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17void Rect::join(const Rect& r) {
18 if (r.isEmpty()) {
19 return;
20 }
21
22 if (this->isEmpty()) {
23 *this = r;
24 } else {
25 left = std::min(left, r.left);
26 top = std::min(top, r.top);
27 right = std::max(right, r.right);
28 bottom = std::max(bottom, r.bottom);
29 }
30}
31
32Rect Rect::makeFittingSize(Size size, FittingSizeMode mode) const {
33 auto selfWidth = width();

Callers 15

resolveAbsoluteImportFunction · 0.45
resolveVirtualNodeMethod · 0.45
throwInvalidSlotMethod · 0.45
submitMethod · 0.45
formatMethod · 0.45
classNamesFunction · 0.45
formatDurationSecondsFunction · 0.45
stringifyInnerFunction · 0.45
titleCaseFunction · 0.45

Calls 4

isEmptyMethod · 0.95
minFunction · 0.85
maxFunction · 0.85
isEmptyMethod · 0.45

Tested by 3

sanitizeFunction · 0.36
mainFunction · 0.36
fromByteArrayFunction · 0.36