Merge "Prevents an invalid texture cache being interrogated for a texture. This ...
[platform/core/uifw/dali-core.git] / dali / public-api / actors / blending.h
1 #ifndef __DALI_BLENDING_H__
2 #define __DALI_BLENDING_H__
3
4 /*
5  * Copyright (c) 2015 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/public-api/common/dali-common.h>
23
24 namespace Dali
25 {
26 /**
27  * @addtogroup dali-core-actors
28  * @{
29  */
30
31 namespace BlendingMode
32 {
33 /**
34  * @brief Blending mode.
35  * @see Dali::RenderableActor::SetBlendMode() and Dali::RenderableActor::GetBlendMode()
36  */
37 enum Type
38 {
39   OFF,  ///< Blending is disabled.
40   AUTO, ///< Blending is enabled if there is alpha channel.
41   ON    ///< Blending is enabled.
42 };
43
44 } //namespace BlendingMode
45
46 namespace BlendingFactor
47 {
48 /**
49  * @brief Blending Factor.
50  *
51  * @see Dali::RenderableActor::SetBlendFunc() and Dali::RenderableActor::GetBlendFunc()
52  */
53 enum Type
54 {
55   ZERO                     = 0,
56   ONE                      = 1,
57   SRC_COLOR                = 0x0300,
58   ONE_MINUS_SRC_COLOR      = 0x0301,
59   SRC_ALPHA                = 0x0302,
60   ONE_MINUS_SRC_ALPHA      = 0x0303,
61   DST_ALPHA                = 0x0304,
62   ONE_MINUS_DST_ALPHA      = 0x0305,
63   DST_COLOR                = 0x0306,
64   ONE_MINUS_DST_COLOR      = 0x0307,
65   SRC_ALPHA_SATURATE       = 0x0308,
66   CONSTANT_COLOR           = 0x8001,
67   ONE_MINUS_CONSTANT_COLOR = 0x8002,
68   CONSTANT_ALPHA           = 0x8003,
69   ONE_MINUS_CONSTANT_ALPHA = 0x8004
70 };
71
72 } // namespace BlendingFactor
73
74 namespace BlendingEquation
75 {
76 /**
77  * @brief Blending Equation.
78  *
79  * @see Dali::RenderableActor::SetBlendEquation() and Dali::RenderableActor::GetBlendEquation()
80  */
81 enum Type
82 {
83   ADD              = 0x8006,
84   SUBTRACT         = 0x800A,
85   REVERSE_SUBTRACT = 0x800B
86 };
87
88 } // namespace BlendingEquation
89
90 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_SRC_FACTOR_RGB;    ///< BlendingFactor::SRC_ALPHA
91 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_DEST_FACTOR_RGB;   ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
92 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_SRC_FACTOR_ALPHA;  ///< BlendingFactor::ONE
93 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_DEST_FACTOR_ALPHA; ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
94
95 DALI_IMPORT_API extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_RGB;     ///< BlendingEquation::ADD
96 DALI_IMPORT_API extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_ALPHA;   ///< BlendingEquation::ADD
97
98 /**
99  * @}
100  */
101 } // namespace Dali
102
103 #endif // __DALI_BLENDING_H__