| 932 | } |
| 933 | |
| 934 | void Layer::setBoxShadow(Scalar widthOffset, Scalar heightOffset, Scalar blurAmount, Color color) { |
| 935 | if (color == Color::transparent()) { |
| 936 | if (_boxShadow != nullptr) { |
| 937 | _boxShadow = nullptr; |
| 938 | setNeedsDisplay(); |
| 939 | } |
| 940 | } else { |
| 941 | if (_boxShadow == nullptr) { |
| 942 | _boxShadow = Valdi::makeShared<BoxShadow>(); |
| 943 | } |
| 944 | _boxShadow->setOffset(Size::make(widthOffset, heightOffset)); |
| 945 | _boxShadow->setBlurAmount(blurAmount); |
| 946 | _boxShadow->setColor(color); |
| 947 | } |
| 948 | } |
| 949 | |
| 950 | Scalar Layer::getTranslationX() const { |
| 951 | return _translation.width; |
nothing calls this directly
no test coverage detected