From 002b5fb20e7788fc6279effb7ad9f10dc53c26b5 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 12 Oct 2024 14:34:18 +0800 Subject: [PATCH] =?utf8?q?=E5=85=B3=E6=9C=BA=E5=8A=A8=E7=94=BB=E4=BD=BF?= =?utf8?q?=E7=94=A8IMG=5FSRC=5FFILE=5FPATH=E8=80=8C=E4=B8=8D=E7=94=A8IMG?= =?utf8?q?=5FSRC=5FIMAGE=5FINFO=20=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=85=B3?= =?utf8?q?=E6=9C=BA=E5=8A=A8=E7=94=BB=E5=87=BA=E7=8E=B0=E6=85=A2=E9=97=AE?= =?utf8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../include/ShutDownImageAnimatorView.h | 5 +++-- .../src/ShutDownImageAnimatorView.cpp | 16 ++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h index 0e23c99d6..c57f5246c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-07-20 11:05:46 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-10-11 16:13:29 + * @LastEditTime: 2024-10-12 14:29:17 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/include/ShutDownImageAnimatorView.h */ @@ -41,7 +41,8 @@ namespace OHOS UIViewGroup *group{nullptr}; UIImageAnimatorView *shutDownImageAnimatorView{nullptr}; // 关机动画 ImageAnimatorInfo ShutDownImageInfo[SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES]; // 关机图像的信息 - const ImageInfo **ShutDownPathsArray{nullptr}; // 关机图片路径数组 + const char **ShutDownPathsArray{nullptr}; + // const ImageInfo **ShutDownPathsArray{nullptr}; // 关机图片路径数组 int OperationType; bool isShutDownImageAnimatorStart{false}; }; diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp index 29d932b1b..8116e9a6d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp @@ -41,8 +41,8 @@ namespace OHOS delete shutDownImageAnimatorView; shutDownImageAnimatorView = nullptr; } - // FreeImageInfoArray(ShutDownPathsArray, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); - FreeImageInfoArray(ShutDownPathsArray,ShutDownPaths,SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + FreeImagePathsArray(ShutDownPathsArray, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + // FreeImageInfoArray(ShutDownPathsArray,ShutDownPaths,SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); delete group; group = nullptr; } @@ -98,8 +98,8 @@ namespace OHOS bool ShutDownImageAnimatorView::ShowUpShutDownAnimatorView() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ShutDownImageAnimatorView::ShowUpShutDownAnimatorView"); - // ShutDownPathsArray = CreateImagePathsArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); - ShutDownPathsArray = CreateImageInfoArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + ShutDownPathsArray = CreateImagePathsArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); + // ShutDownPathsArray = CreateImageInfoArray(ShutDownPaths, SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES); if (shutDownImageAnimatorView == nullptr) { @@ -111,10 +111,10 @@ namespace OHOS } for (uint8_t i = 0; i < SHUTDOWN_IMAGE_ANIMATOR_VIEW_NUM_FRAMES; i++) { - // ShutDownImageInfo[i].imagePath = (ShutDownPathsArray[i]); - // ShutDownImageInfo[i].imageType = IMG_SRC_FILE_PATH; - ShutDownImageInfo[i].imageInfo = (ShutDownPathsArray[i]); - ShutDownImageInfo[i].imageType = IMG_SRC_IMAGE_INFO; + ShutDownImageInfo[i].imagePath = (ShutDownPathsArray[i]); + ShutDownImageInfo[i].imageType = IMG_SRC_FILE_PATH; + // ShutDownImageInfo[i].imageInfo = (ShutDownPathsArray[i]); + // ShutDownImageInfo[i].imageType = IMG_SRC_IMAGE_INFO; ShutDownImageInfo[i].pos.x = SHUTDOWN_IMAGE_ANIMATOR_VIEW_X; ShutDownImageInfo[i].pos.y = SHUTDOWN_IMAGE_ANIMATOR_VIEW_Y; ShutDownImageInfo[i].width = SHUTDOWN_IMAGE_ANIMATOR_VIEW_W; -- 2.17.1