MCPcopy Create free account
hub / github.com/VCVRack/Rack / getChildrenBoundingBox

Method getChildrenBoundingBox

src/widget/Widget.cpp:91–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91math::Rect Widget::getChildrenBoundingBox() {
92 math::Vec min = math::Vec(INFINITY, INFINITY);
93 math::Vec max = math::Vec(-INFINITY, -INFINITY);
94 for (Widget* child : children) {
95 min = min.min(child->box.getTopLeft());
96 max = max.max(child->box.getBottomRight());
97 }
98 return math::Rect::fromMinMax(min, max);
99}
100
101
102math::Rect Widget::getVisibleChildrenBoundingBox() {

Callers 2

zoomToModulesMethod · 0.80
stepMethod · 0.80

Calls 5

VecClass · 0.85
getTopLeftMethod · 0.80
getBottomRightMethod · 0.80
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected