Merge "Rename visual fitting mode property" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / visuals / visual-properties-devel.h
1 #ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H
2 #define DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H
3
4 /*
5  * Copyright (c) 2018 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 DevelVisual
31 {
32
33 /**
34  * @brief All the visual types.
35  */
36 enum Type
37 {
38   BORDER         = Dali::Toolkit::Visual::BORDER,
39   COLOR          = Dali::Toolkit::Visual::COLOR,
40   GRADIENT       = Dali::Toolkit::Visual::GRADIENT,
41   IMAGE          = Dali::Toolkit::Visual::IMAGE,
42   MESH           = Dali::Toolkit::Visual::MESH,
43   PRIMITIVE      = Dali::Toolkit::Visual::PRIMITIVE,
44   WIREFRAME      = Dali::Toolkit::Visual::WIREFRAME,
45   TEXT           = Dali::Toolkit::Visual::TEXT,
46   N_PATCH        = Dali::Toolkit::Visual::N_PATCH,
47   SVG            = Dali::Toolkit::Visual::SVG,
48   ANIMATED_IMAGE = Dali::Toolkit::Visual::ANIMATED_IMAGE,
49
50   ANIMATED_GRADIENT = ANIMATED_IMAGE + 1,  //< Renders an animated gradient.
51 };
52
53 /**
54  * @brief Visual Properties
55  */
56 namespace Property
57 {
58 enum Type
59 {
60   TYPE                = Dali::Toolkit::Visual::Property::TYPE,
61   SHADER              = Dali::Toolkit::Visual::Property::SHADER,
62   TRANSFORM           = Dali::Toolkit::Visual::Property::TRANSFORM,
63   PREMULTIPLIED_ALPHA = Dali::Toolkit::Visual::Property::PREMULTIPLIED_ALPHA,
64   MIX_COLOR           = Dali::Toolkit::Visual::Property::MIX_COLOR,
65   OPACITY             = Dali::Toolkit::Visual::Property::OPACITY,
66
67   /**
68    * @brief The fitting mode of the visual
69    * @details Name "fittingMode", type FittingMode (Property::INTEGER) or Property::STRING.
70    * @see DevelVisual::FittingMode
71    * @note The default is defined by the type of visual (if it's suitable to be stretched or not).
72    */
73   VISUAL_FITTING_MODE = OPACITY + 1,
74 };
75
76 } // namespace Property
77
78 /**
79  * @brief The values of this enum determine how the visual should be fit to the view
80  */
81 enum FittingMode
82 {
83   FIT_KEEP_ASPECT_RATIO,  ///< The visual should be scaled to fit, preserving aspect ratio
84   FILL,                   ///< The visual should be stretched to fill, not preserving aspect ratio
85 };
86
87 } // namespace DevelVisual
88
89 } // namespace Toolkit
90
91 } // namespace Dali
92
93 #endif // DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H