| 917 | } |
| 918 | |
| 919 | Rect 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 | |
| 934 | void Layer::setBoxShadow(Scalar widthOffset, Scalar heightOffset, Scalar blurAmount, Color color) { |
| 935 | if (color == Color::transparent()) { |