882f932b8b237cb953e0881d51b0de2ec3fa3e24
[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) 2016 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/visuals/visual-properties.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace ImageVisual
31 {
32
33 namespace Property
34 {
35
36 enum
37 {
38   /**
39    * @brief The URL of the image.
40    * @details Name "url", type Property::STRING.
41    * @SINCE_1_1.45
42    * @note Mandatory.
43    */
44   URL = VISUAL_PROPERTY_START_INDEX,
45
46   /**
47    * @brief Fitting options, used when resizing images to fit desired dimensions.
48    * @details Name "fittingMode", type Dali::FittingMode (Property::INTEGER) or Property::STRING.
49    * @SINCE_1_1.45
50    * @note Optional. If not supplied, default is FittingMode::SHRINK_TO_FIT.
51    * @note For Normal Quad images only.
52    * @see Dali::FittingMode
53    */
54   FITTING_MODE,
55
56   /**
57    * @brief Filtering options, used when resizing images to sample original pixels.
58    * @details Name "samplingMode", type Dali::SamplingMode (Property::INTEGER) or Property::STRING.
59    * @SINCE_1_1.45
60    * @note Optional. If not supplied, default is SamplingMode::BOX.
61    * @note For Normal Quad images only.
62    * @see Dali::SamplingMode
63    */
64   SAMPLING_MODE,
65
66   /**
67    * @brief The desired image width.
68    * @details Name "desiredWidth", type Property::INTEGER.
69    * @SINCE_1_1.45
70    * @note Optional. If not specified, the actual image width is used.
71    * @note For Normal Quad images only.
72    */
73   DESIRED_WIDTH,
74
75   /**
76    * @brief The desired image height.
77    * @details Name "desiredHeight", type Property::INTEGER.
78    * @SINCE_1_1.45
79    * @note Optional. If not specified, the actual image height is used.
80    * @note For Normal Quad images only.
81    */
82   DESIRED_HEIGHT,
83
84   /**
85    * @brief Whether to load the image synchronously.
86    * @details Name "synchronousLoading", type Property::BOOLEAN.
87    * @SINCE_1_1.45
88    * @note Optional. If not specified, the default is false, i.e. the image is loaded asynchronously.
89    * @note For Normal Quad images only.
90    */
91   SYNCHRONOUS_LOADING,
92
93   /**
94    * @brief If true, only draws the borders.
95    * @details Name "borderOnly", type Property::BOOLEAN.
96    * @SINCE_1_1.45
97    * @note Optional. If not specified, the default is false.
98    * @note For N-Patch images only.
99    */
100   BORDER_ONLY,
101
102   /**
103    * @brief This enables Image visuals to automatically be converted to Batch-Image visuals.
104    * @details Name "batchingEnabled", type Property::BOOLEAN.
105    * @SINCE_1_2.0
106    * @note Optional. If not specified, the default is false.
107    * @note For Image visuals only. Not to be used with NPatch or SVG images.
108    */
109   BATCHING_ENABLED,
110
111   /**
112    * @brief The image area to be displayed.
113    * @details Name "pixelArea", type Property::VECTOR4.
114    *          It is a rectangular area.
115    *          The first two elements indicate the top-left position of the area, and the last two elements are the area width and height respectively.
116    * @SINCE_1_2.1
117    * @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.
118    * @note For Normal Quad images only.
119    */
120   PIXEL_AREA,
121
122   /**
123    * @brief The wrap mode for u coordinate.
124    * @details Name "wrapModeU", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING
125    *          It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
126    * @SINCE_1_2.1
127    * @note Optional. If not specified, the default is CLAMP.
128    * @note For Normal QUAD image only.
129    */
130   WRAP_MODE_U,
131
132   /**
133    * @brief The wrap mode for v coordinate.
134    * @details Name "wrapModeV", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING
135    *          it decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
136    * @SINCE_1_2.1
137    * @note Optional. If not specified, the default is CLAMP.
138    * @note For Normal QUAD image only.
139    */
140   WRAP_MODE_V,
141 };
142
143 } // namespace Property
144
145 } // namespace ImageVisual
146
147 } // namespace Toolkit
148
149 } // namespace Dali
150
151 #endif // DALI_TOOLKIT_IMAGE_VISUAL_PROPERTIES_H