[dali_1.0.1] Merge branch 'tizen'
[platform/core/uifw/dali-core.git] / dali / public-api / actors / renderable-actor.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/public-api/actors/renderable-actor.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/actors/renderable-actor-impl.h>
23
24 namespace Dali
25 {
26
27 const BlendingMode::Type RenderableActor::DEFAULT_BLENDING_MODE = BlendingMode::AUTO;
28
29 RenderableActor::RenderableActor()
30 {
31 }
32
33 RenderableActor RenderableActor::DownCast( BaseHandle handle )
34 {
35   return RenderableActor( dynamic_cast<Dali::Internal::RenderableActor*>(handle.GetObjectPtr()) );
36 }
37
38 RenderableActor::~RenderableActor()
39 {
40 }
41
42 void RenderableActor::SetSortModifier(float modifier)
43 {
44   GetImplementation(*this).SetSortModifier(modifier);
45 }
46
47 float RenderableActor::GetSortModifier() const
48 {
49   return GetImplementation(*this).GetSortModifier();
50 }
51
52 void RenderableActor::SetCullFace(const CullFaceMode mode)
53 {
54   GetImplementation(*this).SetCullFace(mode);
55 }
56
57 CullFaceMode RenderableActor::GetCullFace() const
58 {
59   return GetImplementation(*this).GetCullFace();
60 }
61
62 void RenderableActor::SetBlendMode( BlendingMode::Type mode )
63 {
64   GetImplementation(*this).SetBlendMode( mode );
65 }
66
67 BlendingMode::Type RenderableActor::GetBlendMode() const
68 {
69   return GetImplementation(*this).GetBlendMode();
70 }
71
72 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
73 {
74   GetImplementation(*this).SetBlendFunc( srcFactorRgba, destFactorRgba );
75 }
76
77 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb,   BlendingFactor::Type destFactorRgb,
78                                     BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
79 {
80   GetImplementation(*this).SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
81 }
82
83 void RenderableActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
84                                     BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
85 {
86   GetImplementation(*this).GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
87 }
88
89 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgba )
90 {
91   GetImplementation(*this).SetBlendEquation( equationRgba );
92 }
93
94 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
95 {
96   GetImplementation(*this).SetBlendEquation( equationRgb, equationAlpha );
97 }
98
99 void RenderableActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
100 {
101   GetImplementation(*this).GetBlendEquation( equationRgb, equationAlpha );
102 }
103
104 void RenderableActor::SetBlendColor( const Vector4& color )
105 {
106   GetImplementation(*this).SetBlendColor( color );
107 }
108
109 const Vector4& RenderableActor::GetBlendColor() const
110 {
111   return GetImplementation(*this).GetBlendColor();
112 }
113
114 RenderableActor::RenderableActor(Internal::RenderableActor* internal)
115 : Actor(internal)
116 {
117 }
118
119 } // namespace Dali