Remove orientation from application class
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / adaptor-framework / bitmap-loader.cpp
1 /*
2  * Copyright (c) 2014 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 #include <dali/integration-api/bitmap.h>
24 #include <dali/integration-api/resource-types.h>
25 #include <dali/integration-api/resource-cache.h>
26
27 // INTERNAL INCLUDES
28 #include "image-loaders/image-loader.h"
29 #include <bitmap-loader-impl.h>
30
31 namespace Dali
32 {
33
34 BitmapLoader BitmapLoader::New(const std::string& filename)
35 {
36   IntrusivePtr<Internal::BitmapLoader> internal = Internal::BitmapLoader::New(filename);
37   return BitmapLoader( internal.Get() );
38 }
39
40 BitmapLoader::BitmapLoader()
41 {
42 }
43
44 BitmapLoader::BitmapLoader(Internal::BitmapLoader* internal)
45 : BaseHandle( internal )
46 {
47 }
48
49 BitmapLoader::~BitmapLoader()
50 {
51 }
52
53 BitmapLoader::BitmapLoader( const BitmapLoader& handle )
54 : BaseHandle( handle )
55 {
56 }
57
58 BitmapLoader& BitmapLoader::operator=(const BitmapLoader& rhs)
59 {
60   BaseHandle::operator=(rhs);
61   return *this;
62 }
63
64 unsigned char* BitmapLoader::GetPixelData() const
65 {
66   return GetImplementation(*this).GetPixelData();
67 }
68
69 unsigned int BitmapLoader::GetImageHeight() const
70 {
71   return GetImplementation(*this).GetImageHeight();
72 }
73
74 unsigned int BitmapLoader::GetImageWidth() const
75 {
76   return GetImplementation(*this).GetImageWidth();
77 }
78
79 unsigned int BitmapLoader::GetBufferStride() const
80 {
81   return GetImplementation(*this).GetBufferStride();
82 }
83
84 Pixel::Format BitmapLoader::GetPixelFormat() const
85 {
86   return GetImplementation(*this).GetPixelFormat();
87 }
88
89 } // namespace Dali