2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include "bitmap-loader.h"
24 #include <bitmap-loader-impl.h>
29 BitmapLoader BitmapLoader::New( const std::string& url,
31 FittingMode::Type fittingMode,
32 SamplingMode::Type samplingMode,
33 bool orientationCorrection)
35 IntrusivePtr<Internal::BitmapLoader> internal = Internal::BitmapLoader::New(url, size, fittingMode, samplingMode, orientationCorrection);
36 return BitmapLoader( internal.Get() );
39 BitmapLoader::BitmapLoader()
43 BitmapLoader::BitmapLoader(Internal::BitmapLoader* internal)
44 : BaseHandle( internal )
48 BitmapLoader::~BitmapLoader()
52 BitmapLoader::BitmapLoader( const BitmapLoader& handle )
53 : BaseHandle( handle )
57 BitmapLoader& BitmapLoader::operator=(const BitmapLoader& rhs)
59 BaseHandle::operator=(rhs);
63 void BitmapLoader::Load()
65 GetImplementation(*this).Load();
68 bool BitmapLoader::IsLoaded()
70 return GetImplementation(*this).IsLoaded();
73 unsigned char* BitmapLoader::GetPixelData() const
75 return GetImplementation(*this).GetPixelData();
78 unsigned int BitmapLoader::GetImageHeight() const
80 return GetImplementation(*this).GetImageHeight();
83 unsigned int BitmapLoader::GetImageWidth() const
85 return GetImplementation(*this).GetImageWidth();
88 Pixel::Format BitmapLoader::GetPixelFormat() const
90 return GetImplementation(*this).GetPixelFormat();