1 #ifndef __DALI_BITMAP_LOADER_IMPL_H__
2 #define __DALI_BITMAP_LOADER_IMPL_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/images/pixel.h>
23 #include <dali/public-api/object/base-object.h>
24 #include <dali/public-api/common/intrusive-ptr.h>
25 #include <dali/integration-api/bitmap.h>
26 #include <dali/integration-api/resource-types.h>
29 #include <bitmap-loader.h>
36 class BitmapLoader : public BaseObject
41 * @copydoc Dali::BitmapLoader::New
43 static IntrusivePtr<BitmapLoader> New( const std::string& url,
45 FittingMode::Type fittingMode,
46 SamplingMode::Type samplingMode,
47 bool orientationCorrection);
50 * Create the bitmap loader object.
52 BitmapLoader(const std::string& url,
54 FittingMode::Type fittingMode,
55 SamplingMode::Type samplingMode,
56 bool orientationCorrection);
67 * @copydoc Dali::BitmapLoader::Load
72 * @copydoc Dali::BitmapLoader::IsLoaded
77 * @copydoc Dali::BitmapLoader::GetUrl()
79 const std::string& GetUrl() const;
82 * @copydoc Dali::BitmapLoader::GetPixelData
84 Dali::PixelData GetPixelData() const;
87 Integration::BitmapResourceType mResourceType;
88 Dali::PixelData mPixelData;
89 const std::string mUrl;
95 inline Internal::BitmapLoader& GetImplementation(Dali::BitmapLoader& handle)
97 DALI_ASSERT_ALWAYS( handle && "handle is empty" );
99 BaseObject& object = handle.GetBaseObject();
101 return static_cast<Internal::BitmapLoader&>(object);
104 inline const Internal::BitmapLoader& GetImplementation(const Dali::BitmapLoader& handle)
106 DALI_ASSERT_ALWAYS( handle && "handle is empty" );
108 const BaseObject& object = handle.GetBaseObject();
110 return static_cast<const Internal::BitmapLoader&>(object);
115 #endif // __DALI_BITMAP_LOADER_IMPL_H__