[Tizen] Fix stretchRanges error when we use cached image with border 73/320973/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 12 Mar 2025 05:16:37 +0000 (14:16 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 12 Mar 2025 07:18:15 +0000 (16:18 +0900)
Their was some typo error when we copy npatch image infomations from
cached data

Change-Id: Iea632af9dc94825ed59d4df07cf8c7821b2396cc
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/visuals/npatch-loader.cpp

index 24d919a4306f0a9b5a0dd211e73a6e29071fe564..b1f412f6c35b935e663992c15d477aabcc9fe1aa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -271,10 +271,10 @@ std::shared_ptr<NPatchData> NPatchLoader::GetNPatchData(const VisualUrl& url, co
     info.mData->SetTextures(infoPtr->mData->GetTextures());
 
     NPatchUtility::StretchRanges stretchRangesX;
-    stretchRangesX.PushBack(Uint16Pair(border.left, ((info.mData->GetCroppedWidth() >= static_cast<unsigned int>(border.right)) ? info.mData->GetCroppedHeight() - border.right : 0)));
+    stretchRangesX.PushBack(Uint16Pair(border.left, ((info.mData->GetCroppedWidth() >= static_cast<unsigned int>(border.right)) ? info.mData->GetCroppedWidth() - border.right : 0)));
 
     NPatchUtility::StretchRanges stretchRangesY;
-    stretchRangesY.PushBack(Uint16Pair(border.top, ((info.mData->GetCroppedWidth() >= static_cast<unsigned int>(border.bottom)) ? info.mData->GetCroppedHeight() - border.bottom : 0)));
+    stretchRangesY.PushBack(Uint16Pair(border.top, ((info.mData->GetCroppedHeight() >= static_cast<unsigned int>(border.bottom)) ? info.mData->GetCroppedHeight() - border.bottom : 0)));
 
     info.mData->SetStretchPixelsX(stretchRangesX);
     info.mData->SetStretchPixelsY(stretchRangesY);