1 #ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H
2 #define DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>
30 namespace DevelImageVisual
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,
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.
55 * @note For N-Patch images only.
57 BORDER = WRAP_MODE_V + 1,
60 * @brief Whether to use the texture atlas
61 * @details Name "atlasing", type Property::BOOLEAN, true to enable texture atlas
63 * @note Optional. By default atlasing is off.
66 ATLASING = WRAP_MODE_V + 2,
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.
78 ALPHA_MASK_URL = WRAP_MODE_V + 3,
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
85 BATCH_SIZE = WRAP_MODE_V + 4,
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
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.
97 CACHE_SIZE = WRAP_MODE_V + 5,
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.
103 FRAME_DELAY = WRAP_MODE_V + 6,
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.
111 MASK_CONTENT_SCALE = WRAP_MODE_V + 7,
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.
119 CROP_TO_MASK = WRAP_MODE_V + 8,
123 } //namespace Property
125 } // namespace DevelImageVisual
127 } // namespace Toolkit
131 #endif // DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H