Support window resizing
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / bitmap-loader.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 // CLASS HEADER
18 #include "bitmap-loader.h"
19
20 // EXTERNAL INCLUDES
21 #include <string>
22
23 // INTERNAL INCLUDES
24 #include <bitmap-loader-impl.h>
25
26 namespace Dali
27 {
28
29 BitmapLoader BitmapLoader::New( const std::string& url,
30                                 ImageDimensions size,
31                                 FittingMode::Type fittingMode,
32                                 SamplingMode::Type samplingMode,
33                                 bool orientationCorrection)
34 {
35   IntrusivePtr<Internal::BitmapLoader> internal = Internal::BitmapLoader::New(url, size, fittingMode, samplingMode, orientationCorrection);
36   return BitmapLoader( internal.Get() );
37 }
38
39 BitmapLoader::BitmapLoader()
40 {
41 }
42
43 BitmapLoader::BitmapLoader(Internal::BitmapLoader* internal)
44 : BaseHandle( internal )
45 {
46 }
47
48 BitmapLoader::~BitmapLoader()
49 {
50 }
51
52 BitmapLoader::BitmapLoader( const BitmapLoader& handle )
53 : BaseHandle( handle )
54 {
55 }
56
57 BitmapLoader& BitmapLoader::operator=(const BitmapLoader& rhs)
58 {
59   BaseHandle::operator=(rhs);
60   return *this;
61 }
62
63 void BitmapLoader::Load()
64 {
65   GetImplementation(*this).Load();
66 }
67
68 bool BitmapLoader::IsLoaded()
69 {
70   return GetImplementation(*this).IsLoaded();
71 }
72
73 std::string BitmapLoader::GetUrl() const
74 {
75   return GetImplementation(*this).GetUrl();
76 }
77
78 PixelData BitmapLoader::GetPixelData() const
79 {
80   return GetImplementation(*this).GetPixelData();
81 }
82
83 } // namespace Dali