1 #ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H
2 #define DALI_TOOLKIT_DEVEL_API_VISUALS_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/visual-properties.h>
34 * @brief All the visual types.
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,
46 TEXT = WIREFRAME + 1, ///< Renders text.
47 N_PATCH = WIREFRAME + 2, ///< Renders an n-patch image.
48 SVG = WIREFRAME + 3, ///< Renders an SVG image.
49 ANIMATED_IMAGE = WIREFRAME + 4 ///< Renders a animated image.
57 TYPE = Dali::Toolkit::Visual::Property::TYPE,
58 SHADER = Dali::Toolkit::Visual::Property::SHADER,
61 * @brief The transform used by the visual.
62 * @details Name "transform", type Property::Map.
65 * @see DevelVisual::Transform::Property
67 TRANSFORM = SHADER + 1,
70 * @brief Enables/disables premultiplied alpha.
71 * The premultiplied alpha is false by default unless this behaviour is modified
72 * by the derived Visual type.
74 * @details Name "premultipliedAlpha", type Property::Boolean.
78 PREMULTIPLIED_ALPHA = SHADER + 2,
81 * @brief Mix color is a blend color for any visual.
82 * @details Name "mixColor", type Property::VECTOR3 or Property::VECTOR4
86 MIX_COLOR = SHADER + 3,
89 * @brief Opacity is the alpha component of the mixColor, above.
90 * @details Name "opacity", type Property::FLOAT
97 } // namespace Property
103 * @brief Policies used by the transform for the offset or size.
110 RELATIVE = 0, ///< Relative to the control (percentage [0.0f to 1.0f] of the control).
111 ABSOLUTE = 1 ///< Absolute value in world units.
114 } // namespace Policy
122 * @brief Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
123 * @details Name "offset", type Property::VECTOR2
129 * @brief Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
130 * @details Name "size", type Property::VECTOR2
136 * @brief The origin of the visual within its control area.
137 * @details Name "origin", type Align::Type (Property::INTEGER) or Property::STRING.
138 * @see Toolkit::Align
143 * @brief The anchor-point of the visual
144 * @details Name "anchorPoint", type Align::Type (Property::INTEGER) or Property::STRING.
145 * @see Toolkit::Align
150 * @brief Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
151 * @details Name "offsetPolicy", type Vector2 or Property::ARRAY of Property::STRING.
152 * If Property::ARRAY then 2 strings expected for the x and y.
156 * control.SetProperty( ..., // Some visual based property
157 * Property::Map().Add( ... ) // Properties to set up visual
158 * .Add( DevelVisual::Property::TRANSFORM,
159 * Property::Array().Add( DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Policy::ABSOLUTE, Policy::RELATIVE ) ) )
160 * .Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 1.0f ) ) );
169 * "offsetPolicy" : [ "ABSOLUTE", "RELATIVE" ],
170 * "offset" : [ 10, 1.0 ]
177 * @note By default, both the x and the y offset is RELATIVE.
182 * @brief Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
183 * @details Name "sizePolicy", type Vector2 or Property::ARRAY of Property::STRING.
184 * If Property::ARRAY then 2 strings expected for the width and height.
187 * @see OFFSET_POLICY for example
188 * @note By default, both the width and the height is RELATIVE to the control's size.
193 } // namespace Property
195 } // namespace Transform
197 } // namespace DevelVisual
199 } // namespace Toolkit
203 #endif // DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H