(ItemView) Make default layout properties public
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / visuals / image-visual-properties-devel.h
1 #ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H
2 #define DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_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/visuals/image-visual-properties.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace DevelImageVisual
31 {
32
33 namespace Property
34 {
35
36 enum Type
37 {
38   URL                 = Dali::Toolkit::ImageVisual::Property::URL,
39   FITTING_MODE        = Dali::Toolkit::ImageVisual::Property::FITTING_MODE,
40   SAMPLING_MODE       = Dali::Toolkit::ImageVisual::Property::SAMPLING_MODE,
41   DESIRED_WIDTH       = Dali::Toolkit::ImageVisual::Property::DESIRED_WIDTH,
42   DESIRED_HEIGHT      = Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT,
43   SYNCHRONOUS_LOADING = Dali::Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING,
44   BORDER_ONLY         = Dali::Toolkit::ImageVisual::Property::BORDER_ONLY,
45   PIXEL_AREA          = Dali::Toolkit::ImageVisual::Property::PIXEL_AREA,
46   WRAP_MODE_U         = Dali::Toolkit::ImageVisual::Property::WRAP_MODE_U,
47   WRAP_MODE_V         = Dali::Toolkit::ImageVisual::Property::WRAP_MODE_V,
48
49   /**
50    * @brief The border of the image
51    * @details Name "border", type Property::RECTANGLE or Property::VECTOR4
52    *          The border of the image in the order: left, right, bottom, top.
53    *
54    * @note Optional.
55    * @note For N-Patch images only.
56    */
57   BORDER = WRAP_MODE_V + 1,
58
59   /**
60    * @brief Whether to use the texture atlas
61    * @details Name "atlasing", type Property::BOOLEAN, true to enable texture atlas
62    *
63    * @note Optional. By default atlasing is off.
64    */
65
66   ATLASING = WRAP_MODE_V + 2,
67
68   /**
69    * @brief URL of a masking image
70    * @details Name "alphaMaskUrl", type Property::STRING, URL of image to apply as
71    * a mask after image loading. If set after the main URL has finished loading, this
72    * may necessitate a re-load of the main image. The alpha mask image will be scaled
73    * on load to match the size of the main image, then applied to the pixel data
74    * before uploading to GL.
75    * @note Optional.
76    */
77
78   ALPHA_MASK_URL = WRAP_MODE_V + 3,
79
80   /**
81    * @brief Defines the batch size for pre-loading images in the AnimatedImageVisual
82    * @details Name "batchSize", type Property::INTEGER, number of images to pre-load
83    * before starting to play. Default value: 1
84    */
85   BATCH_SIZE = WRAP_MODE_V + 4,
86
87   /**
88    * @brief Defines the cache size for loading images in the AnimatedImageVisual
89    * @details Name "cacheSize", type Property::INTEGER, number of images to keep
90    * cached ahead during playback. Default value: 1
91    *
92    * @note, cacheSize should be >= batchSize.
93    * If it isn't, then the cache will automatically be changed to batchSize.
94    * @note, because of the defaults, it is expected that the application developer
95    * tune the batch and cache sizes to their particular use case.
96    */
97   CACHE_SIZE = WRAP_MODE_V + 5,
98
99   /**
100    * @brief The number of milliseconds between each frame in the AnimatedImageVisual
101    * @details Name "frameDelay", type Property::INTEGER, The number of milliseconds between each frame. Note, this is only used with the URLS property above.
102    */
103   FRAME_DELAY = WRAP_MODE_V + 6,
104
105   /**
106    * @brief The scale factor to apply to the content image before masking
107    * @details Name "maskContentScale", type Property::FLOAT, The scale factor
108    * to apply to the content before masking. Note, scaled images are cropped to
109    * the same size as the alpha mask.
110    */
111   MASK_CONTENT_SCALE = WRAP_MODE_V + 7,
112
113   /**
114    * @brief Whether to crop image to mask or scale mask to fit image
115    * @details Name "cropToMask", type Property::BOOLEAN, True if the image should
116    * be cropped to match the mask size, or false if the image should remain the same size.
117    * Note, if this is false, then the mask is scaled to fit the image before being applied.
118    */
119   CROP_TO_MASK = WRAP_MODE_V + 8,
120
121 };
122
123 } //namespace Property
124
125 } // namespace DevelImageVisual
126
127 } // namespace Toolkit
128
129 } // namespace Dali
130
131 #endif // DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H