Merge "Adding support for multiple images in AnimatedImageVisual" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / visuals / image-visual-properties.h
1 #ifndef DALI_TOOLKIT_IMAGE_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_IMAGE_VISUAL_PROPERTIES_H
3
4 /*
5  * Copyright (c) 2017 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
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/public-api/toolkit-property-index-ranges.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 /**
31  * @addtogroup dali_toolkit_visuals
32  * @{
33  */
34
35 /**
36  * @brief ImageVisual is to render an image into the control's quad.
37  * @SINCE_1_1.45
38  */
39 namespace ImageVisual
40 {
41
42 /**
43  * @brief ImageVisual Property
44  * @SINCE_1_1.45
45  */
46 namespace Property
47 {
48
49 /**
50  * @brief ImageVisual Property
51  * @SINCE_1_1.45
52  */
53 enum
54 {
55   /**
56    * @brief The URL of the image.
57    * @details Name "url", type Property::STRING or Property::ARRAY of Property::STRING
58    * @note The array form is used for generating animated image visuals.
59    * @SINCE_1_1.45
60    * @note Mandatory.
61    */
62   URL = VISUAL_PROPERTY_START_INDEX,
63
64   /**
65    * @brief Fitting options, used when resizing images to fit desired dimensions.
66    * @details Name "fittingMode", type Dali::FittingMode (Property::INTEGER) or Property::STRING.
67    * @SINCE_1_1.45
68    * @note Optional. If not supplied, default is FittingMode::SHRINK_TO_FIT.
69    * @note For Normal Quad images only.
70    * @see Dali::FittingMode
71    */
72   FITTING_MODE,
73
74   /**
75    * @brief Filtering options, used when resizing images to sample original pixels.
76    * @details Name "samplingMode", type Dali::SamplingMode (Property::INTEGER) or Property::STRING.
77    * @SINCE_1_1.45
78    * @note Optional. If not supplied, default is SamplingMode::BOX.
79    * @note For Normal Quad images only.
80    * @see Dali::SamplingMode
81    */
82   SAMPLING_MODE,
83
84   /**
85    * @brief The desired image width.
86    * @details Name "desiredWidth", type Property::INTEGER.
87    * @SINCE_1_1.45
88    * @note Optional. If not specified, the actual image width is used.
89    * @note For Normal Quad images only.
90    */
91   DESIRED_WIDTH,
92
93   /**
94    * @brief The desired image height.
95    * @details Name "desiredHeight", type Property::INTEGER.
96    * @SINCE_1_1.45
97    * @note Optional. If not specified, the actual image height is used.
98    * @note For Normal Quad images only.
99    */
100   DESIRED_HEIGHT,
101
102   /**
103    * @brief Whether to load the image synchronously.
104    * @details Name "synchronousLoading", type Property::BOOLEAN.
105    * @SINCE_1_1.45
106    * @note Optional. If not specified, the default is false, i.e. the image is loaded asynchronously.
107    * @note For Normal Quad images only.
108    */
109   SYNCHRONOUS_LOADING,
110
111   /**
112    * @brief If true, only draws the borders.
113    * @details Name "borderOnly", type Property::BOOLEAN.
114    * @SINCE_1_1.45
115    * @note Optional. If not specified, the default is false.
116    * @note For N-Patch images only.
117    */
118   BORDER_ONLY,
119
120   /**
121    * @brief The image area to be displayed.
122    * @details Name "pixelArea", type Property::VECTOR4.
123    *          It is a rectangular area.
124    *          The first two elements indicate the top-left position of the area, and the last two elements are the area width and height respectively.
125    * @SINCE_1_2.1
126    * @note Optional. If not specified, the default value is [0.0, 0.0, 1.0, 1.0], i.e. the entire area of the image.
127    * @note For Normal Quad images only.
128    */
129   PIXEL_AREA,
130
131   /**
132    * @brief The wrap mode for u coordinate.
133    * @details Name "wrapModeU", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING
134    *          It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
135    * @SINCE_1_2.1
136    * @note Optional. If not specified, the default is CLAMP.
137    * @note For Normal QUAD image only.
138    */
139   WRAP_MODE_U,
140
141   /**
142    * @brief The wrap mode for v coordinate.
143    * @details Name "wrapModeV", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING
144    *          it decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
145    * @SINCE_1_2.1
146    * @note Optional. If not specified, the default is CLAMP.
147    * @note For Normal QUAD image only.
148    */
149   WRAP_MODE_V,
150 };
151
152 } // namespace Property
153
154 } // namespace ImageVisual
155
156 /**
157  * @}
158  */
159
160 } // namespace Toolkit
161
162 } // namespace Dali
163
164 #endif // DALI_TOOLKIT_IMAGE_VISUAL_PROPERTIES_H