mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 17:21:51 +00:00
update code
Signed-off-by: zhoujing <zhoujing96@huawei.com>
This commit is contained in:
parent
5d3182a5f5
commit
ee9347ba93
@ -437,14 +437,11 @@ napi_value FilterNapi::Blur(napi_env env, napi_callback_info info)
|
||||
}
|
||||
}
|
||||
}
|
||||
auto blur;
|
||||
if (argc == ARGS_ONE) {
|
||||
EFFECT_LOG_I("FilterNapi parse input with default skTileMode");
|
||||
blur = Rosen::SKImageFilterFactory::Blur(radius);
|
||||
} else if (argc == ARGS_TWO) {
|
||||
int32_t skTileMode = 0;
|
||||
if (argc == ARGS_ONE) {
|
||||
EFFECT_LOG_I("FilterNapi parse input with default skTileMode.");
|
||||
} else if (argc == ARGS_TWO) {
|
||||
napi_get_value_int32(env, argv[PARAM1], &skTileMode);
|
||||
blur = Rosen::SKImageFilterFactory::Blur(radius, skTileMode);
|
||||
}
|
||||
|
||||
FilterNapi* thisFilter = nullptr;
|
||||
@ -453,6 +450,7 @@ napi_value FilterNapi::Blur(napi_env env, napi_callback_info info)
|
||||
EFFECT_LOG_I("FilterNapi napi_unwrap is Faild");
|
||||
return nullptr;
|
||||
}
|
||||
auto blur = Rosen::SKImageFilterFactory::Blur(radius, skTileMode);
|
||||
thisFilter->AddNextFilter(blur);
|
||||
return _this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user