1 #ifndef __DALI_BLENDING_H__
2 #define __DALI_BLENDING_H__
5 * Copyright (c) 2015 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/public-api/common/dali-common.h>
27 * @addtogroup dali_core_actors
31 namespace BlendingMode
34 * @brief Blending mode.
36 * @remarks This is an experimental feature and might not be supported in the next release.
37 * We do recommend not to use it.
41 OFF, ///< Blending is disabled. @SINCE_1_0.0
42 AUTO, ///< Blending is enabled if there is alpha channel. This is the default mode. @SINCE_1_0.0
43 ON ///< Blending is enabled. @SINCE_1_0.0
46 } //namespace BlendingMode
48 namespace BlendingFactor
51 * @brief Blending Factor.
54 * @remarks This is an experimental feature and might not be supported in the next release.
55 * We do recommend not to use it.
59 ZERO = 0, ///< ZERO @SINCE_1_0.0
60 ONE = 1, ///< ONE @SINCE_1_0.0
61 SRC_COLOR = 0x0300, ///< SRC_COLOR @SINCE_1_0.0
62 ONE_MINUS_SRC_COLOR = 0x0301, ///< ONE_MINUS_SRC_COLOR @SINCE_1_0.0
63 SRC_ALPHA = 0x0302, ///< SRC_ALPHA @SINCE_1_0.0
64 ONE_MINUS_SRC_ALPHA = 0x0303, ///< ONE_MINUS_SRC_ALPHA @SINCE_1_0.0
65 DST_ALPHA = 0x0304, ///< DST_ALPHA @SINCE_1_0.0
66 ONE_MINUS_DST_ALPHA = 0x0305, ///< ONE_MINUS_DST_ALPHA @SINCE_1_0.0
67 DST_COLOR = 0x0306, ///< DST_COLOR @SINCE_1_0.0
68 ONE_MINUS_DST_COLOR = 0x0307, ///< ONE_MINUS_DST_COLOR @SINCE_1_0.0
69 SRC_ALPHA_SATURATE = 0x0308, ///< SRC_ALPHA_SATURATE @SINCE_1_0.0
70 CONSTANT_COLOR = 0x8001, ///< CONSTANT_COLOR @SINCE_1_0.0
71 ONE_MINUS_CONSTANT_COLOR = 0x8002, ///< ONE_MINUS_CONSTANT_COLOR @SINCE_1_0.0
72 CONSTANT_ALPHA = 0x8003, ///< CONSTANT_ALPHA @SINCE_1_0.0
73 ONE_MINUS_CONSTANT_ALPHA = 0x8004 ///< ONE_MINUS_CONSTANT_ALPHA @SINCE_1_0.0
76 } // namespace BlendingFactor
78 namespace BlendingEquation
81 * @brief Blending Equation.
84 * @remarks This is an experimental feature and might not be supported in the next release.
85 * We do recommend not to use it.
89 ADD = 0x8006, ///< The source and destination colors are added to each other. @SINCE_1_0.0
90 SUBTRACT = 0x800A, ///< Subtracts the destination from the source. @SINCE_1_0.0
91 REVERSE_SUBTRACT = 0x800B ///< Subtracts the source from the destination. @SINCE_1_0.0
94 } // namespace BlendingEquation
96 DALI_IMPORT_API extern const BlendingFactor::Type DEFAULT_BLENDING_SRC_FACTOR_RGB; ///< BlendingFactor::SRC_ALPHA
97 DALI_IMPORT_API extern const BlendingFactor::Type DEFAULT_BLENDING_DEST_FACTOR_RGB; ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
98 DALI_IMPORT_API extern const BlendingFactor::Type DEFAULT_BLENDING_SRC_FACTOR_ALPHA; ///< BlendingFactor::ONE
99 DALI_IMPORT_API extern const BlendingFactor::Type DEFAULT_BLENDING_DEST_FACTOR_ALPHA; ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
101 DALI_IMPORT_API extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_RGB; ///< BlendingEquation::ADD
102 DALI_IMPORT_API extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_ALPHA; ///< BlendingEquation::ADD
109 #endif // __DALI_BLENDING_H__