1 #ifndef DALI_TOOLKIT_GRADIENT_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_GRADIENT_VISUAL_PROPERTIES_H
5 * Copyright (c) 2016 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>
31 * @addtogroup dali_toolkit_visuals
35 namespace GradientVisual
44 * @brief The start position of a linear gradient.
45 * @details Name "startPosition", type Property::VECTOR2.
47 * @note Mandatory for Linear.
49 START_POSITION = VISUAL_PROPERTY_START_INDEX,
52 * @brief The end position of a linear gradient.
53 * @details Name "endPosition", type Property::VECTOR2.
55 * @note Mandatory for Linear.
60 * @brief The center point of a radial gradient.
61 * @details Name "center", type Property::VECTOR2.
63 * @note Mandatory for Radial.
68 * @brief The size of the radius of a radial gradient.
69 * @details Name "radius", type Property::FLOAT.
71 * @note Mandatory for Radial.
76 * @brief All the stop offsets.
77 * @details Name "stopOffset", type Property::ARRAY of Property::FLOAT.
79 * @note Optional. If not supplied, default is 0.0 and 1.0.
84 * @brief The color at the stop offsets.
85 * @details Name "stopColor", type Property::ARRAY of Property::VECTOR4.
87 * @note Mandatory. At least 2 values required to show a gradient.
92 * @brief Defines the coordinate system for certain attributes of the points in a gradient.
93 * @details Name "units", type Units::Type (Property::INTEGER) or Property::STRING.
95 * @note Optional. If not supplied, default is Units::OBJECT_BOUNDING_BOX.
101 * @brief Indicates what happens if the gradient starts or ends inside the bounds of the target rectangle.
102 * @details Name "spreadMethod", type SpreadMethod::Type (Property::INTEGER) or Property::STRING.
104 * @note Optional. If not supplied, default is SpreadMethod::PAD.
105 * @see SpreadMethod::Type
110 } // namespace Property
116 * @brief The type of coordinate system for certain attributes of the points in a gradient.
118 * This applies to the:
119 * - Start (x1, y1) and End (x2 and y2) points of a line if using a linear gradient.
120 * - Center point (cx, cy) and radius (r) of a circle if using a radial gradient.
124 OBJECT_BOUNDING_BOX, ///< Uses the normals for the start, end & center points, i.e. top-left is (-0.5, -0.5) and bottom-right is (0.5, 0.5). @SINCE_1_1.45
125 USER_SPACE ///< Uses the user coordinates for the start, end & center points, i.e. in a 200 by 200 control, top-left is (0, 0) and bottom-right is (200, 200). @SINCE_1_1.45
130 namespace SpreadMethod
134 * @brief Policies that define what happens if the gradient starts or ends inside the bounds of the target rectangle.
138 PAD, ///< Uses the terminal colors of the gradient to fill the remainder of the quad. @SINCE_1_1.45
139 REFLECT, ///< Reflect the gradient pattern start-to-end, end-to-start, start-to-end etc. until the quad is filled. @SINCE_1_1.45
140 REPEAT ///< Repeat the gradient pattern start-to-end, start-to-end, start-to-end etc. until the quad is filled. @SINCE_1_1.45
143 } // namespace SpreadMethod
145 } // namespace GradientVisual
151 } // namespace Toolkit
155 #endif // DALI_TOOLKIT_GRADIENT_VISUAL_PROPERTIES_H