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

Method setBlurAmount

snap_drawing/src/snap_drawing/cpp/Drawing/BoxShadow.cpp:24–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void BoxShadow::setBlurAmount(Scalar blurAmount) {
25 if (_blurAmount != blurAmount) {
26 _blurAmount = blurAmount;
27 if (blurAmount == 0) {
28 _paint.getSkValue().setMaskFilter(nullptr);
29 } else {
30 _paint.getSkValue().setMaskFilter(SkMaskFilter::MakeBlur(SkBlurStyle::kNormal_SkBlurStyle, blurAmount * 2));
31 }
32 }
33}
34
35void BoxShadow::setColor(Color color) {
36 _color = color;

Callers 1

setBoxShadowMethod · 0.80

Calls 2

getSkValueMethod · 0.80
setMaskFilterMethod · 0.45

Tested by

no test coverage detected