From 5c0c67d77ea7480e2acc2bbf1521de4f943484ca Mon Sep 17 00:00:00 2001 From: Jaesung Ku Date: Tue, 26 Mar 2013 21:06:15 +0900 Subject: [PATCH] Update for getting a bitmap resource Change-Id: I63bdd6b2c9cbca2b13ebf4139756540731aa4c4e Signed-off-by: Jaesung Ku --- src/app/FApp_AppResourceImpl.cpp | 14 ++++++++++++++ src/app/FApp_AppResourceImpl.h | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/app/FApp_AppResourceImpl.h diff --git a/src/app/FApp_AppResourceImpl.cpp b/src/app/FApp_AppResourceImpl.cpp index 04e2e08..7e8c60c 100644 --- a/src/app/FApp_AppResourceImpl.cpp +++ b/src/app/FApp_AppResourceImpl.cpp @@ -241,5 +241,19 @@ _AppResourceImpl::Reinitialize(void) } } +Bitmap* +_AppResourceImpl::GetNonScalingBitmapN(const Tizen::Base::String& imagePath) +{ + _IAppResourceBitmap* pAppResourceBitmap = Tizen::App::_AppResourceImpl::Get_IAppResourceBitmapN(APP_RESOURCE_BITMAP); + + if (pAppResourceBitmap != null) + { + return pAppResourceBitmap->GetBitmapN(imagePath, BITMAP_PIXEL_FORMAT_INVALID); + } + else + { + SysLog(NID_APP, "Getting pAppResourceBitmap instance is failed"); + } +} } } // Tizen::App diff --git a/src/app/FApp_AppResourceImpl.h b/src/app/FApp_AppResourceImpl.h old mode 100644 new mode 100755 index f633981..10dd50c --- a/src/app/FApp_AppResourceImpl.h +++ b/src/app/FApp_AppResourceImpl.h @@ -42,7 +42,8 @@ enum AppResourceBy { APP_RESOURCE_DEFAULT, APP_RESOURCE_BY_APP_ID, - APP_RESOURCE_BY_LIBRARY_NAME + APP_RESOURCE_BY_LIBRARY_NAME, + APP_RESOURCE_BITMAP }; class _AppResourceImpl @@ -141,6 +142,7 @@ public: static void ReinitializeAll(void); static result ReleaseInstance(const Tizen::Base::String& key); + static Tizen::Graphics::Bitmap* GetNonScalingBitmapN(const Tizen::Base::String& imagePath); private: /** * This is the default constructor for this class. -- 2.7.4