From: Eunki, Hong Date: Wed, 12 Mar 2025 05:16:37 +0000 (+0900) Subject: [Tizen] Fix stretchRanges error when we use cached image with border X-Git-Tag: accepted/tizen/7.0/unified/20250320.061615~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1242b30a3f233ad071d2db2d038d42d21ca66f98;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Fix stretchRanges error when we use cached image with border Their was some typo error when we copy npatch image infomations from cached data Change-Id: Iea632af9dc94825ed59d4df07cf8c7821b2396cc Signed-off-by: Eunki, Hong --- diff --git a/dali-toolkit/internal/visuals/npatch-loader.cpp b/dali-toolkit/internal/visuals/npatch-loader.cpp index 24d919a430..b1f412f6c3 100644 --- a/dali-toolkit/internal/visuals/npatch-loader.cpp +++ b/dali-toolkit/internal/visuals/npatch-loader.cpp @@ -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 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(border.right)) ? info.mData->GetCroppedHeight() - border.right : 0))); + stretchRangesX.PushBack(Uint16Pair(border.left, ((info.mData->GetCroppedWidth() >= static_cast(border.right)) ? info.mData->GetCroppedWidth() - border.right : 0))); NPatchUtility::StretchRanges stretchRangesY; - stretchRangesY.PushBack(Uint16Pair(border.top, ((info.mData->GetCroppedWidth() >= static_cast(border.bottom)) ? info.mData->GetCroppedHeight() - border.bottom : 0))); + stretchRangesY.PushBack(Uint16Pair(border.top, ((info.mData->GetCroppedHeight() >= static_cast(border.bottom)) ? info.mData->GetCroppedHeight() - border.bottom : 0))); info.mData->SetStretchPixelsX(stretchRangesX); info.mData->SetStretchPixelsY(stretchRangesY);