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

Method getAbsoluteVisualFrame

snap_drawing/src/snap_drawing/cpp/Layers/Layer.cpp:919–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919Rect Layer::getAbsoluteVisualFrame() {
920 auto frame = Rect::makeXYWH(0, 0, _frame.width(), _frame.height());
921 auto current = Valdi::strongSmallRef(this);
922
923 for (;;) {
924 if (current == nullptr) {
925 return frame;
926 }
927
928 frame = current->convertRectToParent(frame);
929
930 current = Valdi::castOrNull<Layer>(current->getParent());
931 }
932}
933
934void Layer::setBoxShadow(Scalar widthOffset, Scalar heightOffset, Scalar blurAmount, Color color) {
935 if (color == Color::transparent()) {

Callers 1

TESTFunction · 0.80

Calls 5

strongSmallRefFunction · 0.85
convertRectToParentMethod · 0.80
getParentMethod · 0.65
widthMethod · 0.45
heightMethod · 0.45

Tested by 1

TESTFunction · 0.64