rotate bugfix

Signed-off-by: ustc-tianyu <dutianyu4@huawei.com>
This commit is contained in:
ustc-tianyu 2024-05-12 09:30:20 +08:00
parent 4ac3b82513
commit 13bf8784ff

View File

@ -1030,8 +1030,8 @@ napi_value JsCanvas::OnRotate(napi_env env, napi_callback_info info)
double degree = 0.0;
double sx = 0.0;
double sy = 0.0;
if (!(ConvertFromJsValue(env, argv[ARGC_ZERO], degree) && ConvertFromJsValue(env, argv[ARGC_ONE], sx)) &&
ConvertFromJsValue(env, argv[ARGC_TWO], sy)) {
if (!(ConvertFromJsValue(env, argv[ARGC_ZERO], degree) && ConvertFromJsValue(env, argv[ARGC_ONE], sx) &&
ConvertFromJsValue(env, argv[ARGC_TWO], sy))) {
ROSEN_LOGE("JsCanvas::OnRotate argv is invalid");
return NapiGetUndefined(env);
}