1 #ifndef DALI_TOOLKIT_BITMAP_LOADER_H
2 #define DALI_TOOLKIT_BITMAP_LOADER_H
4 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #define DALI_BITMAP_LOADER_H
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/public-api/images/image-operations.h>
24 #include <dali/public-api/images/pixel.h>
25 #include <dali/public-api/images/pixel-data.h>
26 #include <dali/public-api/object/base-handle.h>
35 class DALI_IMPORT_API BitmapLoader : public BaseHandle
39 static BitmapLoader New( const std::string& url,
40 ImageDimensions size = ImageDimensions( 0, 0 ),
41 FittingMode::Type fittingMode = FittingMode::DEFAULT,
42 SamplingMode::Type samplingMode = SamplingMode::BOX_THEN_LINEAR,
43 bool orientationCorrection = true);
46 BitmapLoader(const BitmapLoader& handle);
47 BitmapLoader& operator=(const BitmapLoader& rhs);
52 std::string GetUrl() const;
53 PixelData GetPixelData() const;
55 void WaitForLoading();
56 static BitmapLoader GetLatestCreated(); // return the latest created BitmapLoader
57 static void ResetLatestCreated();
59 public: // Not intended for application developers
61 explicit DALI_INTERNAL BitmapLoader(Internal::BitmapLoader*);
66 #endif // DALI_TOOLKIT_BITMAP_LOADER_H