Fix stretchRanges error when we use cached image with border 60/320960/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 05:16:37 +0000 (14:16 +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/npatch-loader.cpp

index c99eba2e9b3d5de045722f920fbd6e009af1187b..e4d35acef21b1e40815a2c3bb35f1cd276a31d90 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 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.
@@ -276,10 +276,10 @@ NPatchDataPtr NPatchLoader::GetNPatchData(const VisualUrl& url, const Rect<int>&
     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);