DALi Version 1.3.45
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / common / image-loader-input.h
1 #ifndef __DALI_TIZEN_PLATFORM_IMAGE_LOADER_INPUT_H__
2 #define __DALI_TIZEN_PLATFORM_IMAGE_LOADER_INPUT_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  */
19
20 // EXTERNAL INCLUDES
21 #include <cstdio>
22 #include <dali/public-api/images/image-operations.h>
23
24 // INTERNAL INCLUDES
25
26 namespace Dali
27 {
28 namespace TizenPlatform
29 {
30 namespace ImageLoader
31 {
32
33
34 /**
35  * @brief A simple immutable struct to bundle together parameters for scaling an image.
36  * @ToDo Move this to adaptor internal?
37  * @ToDo Rename it after the move to ImageScalingParameters.
38  */
39 class ScalingParameters
40 {
41 public:
42   ScalingParameters( ImageDimensions dimensions = ImageDimensions(), FittingMode::Type fittingMode = FittingMode::DEFAULT, SamplingMode::Type samplingMode = SamplingMode::DEFAULT ) :
43     dimensions(dimensions), scalingMode(fittingMode), samplingMode(samplingMode) {}
44   const ImageDimensions dimensions;
45   const FittingMode::Type scalingMode;
46   const SamplingMode::Type samplingMode;
47 };
48
49   /**
50    * @brief Bundle-up the data pushed into an image loader.
51    */
52 struct Input
53 {
54   Input( FILE* file, ScalingParameters scalingParameters = ScalingParameters(), bool reorientationRequested = true ) :
55     file(file), scalingParameters(scalingParameters), reorientationRequested(reorientationRequested) {}
56   FILE* file;
57   ScalingParameters scalingParameters;
58   bool reorientationRequested;
59 };
60
61 } // ImageLoader
62 } // TizenPlatform
63 } // Dali
64
65 #endif // __DALI_TIZEN_PLATFORM_IMAGE_LOADER_INPUT_H__