2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/public-api/actors/renderable-actor.h>
22 #include <dali/internal/event/actors/renderable-actor-impl.h>
27 const BlendingMode::Type RenderableActor::DEFAULT_BLENDING_MODE = BlendingMode::AUTO;
29 RenderableActor::RenderableActor()
33 RenderableActor RenderableActor::DownCast( BaseHandle handle )
35 return RenderableActor( dynamic_cast<Dali::Internal::RenderableActor*>(handle.GetObjectPtr()) );
38 RenderableActor::~RenderableActor()
42 RenderableActor::RenderableActor(const RenderableActor& copy)
47 RenderableActor& RenderableActor::operator=(const RenderableActor& rhs)
49 BaseHandle::operator=(rhs);
53 RenderableActor& RenderableActor::operator=(BaseHandle::NullType* rhs)
55 DALI_ASSERT_ALWAYS( (rhs == NULL) && "Can only assign NULL pointer to handle");
60 void RenderableActor::SetSortModifier(float modifier)
62 GetImplementation(*this).SetSortModifier(modifier);
65 float RenderableActor::GetSortModifier() const
67 return GetImplementation(*this).GetSortModifier();
70 void RenderableActor::SetCullFace(const CullFaceMode mode)
72 GetImplementation(*this).SetCullFace(mode);
75 CullFaceMode RenderableActor::GetCullFace() const
77 return GetImplementation(*this).GetCullFace();
80 void RenderableActor::SetBlendMode( BlendingMode::Type mode )
82 GetImplementation(*this).SetBlendMode( mode );
85 BlendingMode::Type RenderableActor::GetBlendMode() const
87 return GetImplementation(*this).GetBlendMode();
90 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
92 GetImplementation(*this).SetBlendFunc( srcFactorRgba, destFactorRgba );
95 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
96 BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
98 GetImplementation(*this).SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
101 void RenderableActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
102 BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
104 GetImplementation(*this).GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
107 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgba )
109 GetImplementation(*this).SetBlendEquation( equationRgba );
112 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
114 GetImplementation(*this).SetBlendEquation( equationRgb, equationAlpha );
117 void RenderableActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
119 GetImplementation(*this).GetBlendEquation( equationRgb, equationAlpha );
122 void RenderableActor::SetBlendColor( const Vector4& color )
124 GetImplementation(*this).SetBlendColor( color );
127 const Vector4& RenderableActor::GetBlendColor() const
129 return GetImplementation(*this).GetBlendColor();
132 void RenderableActor::SetFilterMode( FilterMode::Type minFilter, FilterMode::Type magFilter )
134 GetImplementation(*this).SetFilterMode( minFilter, magFilter );
137 void RenderableActor::GetFilterMode( FilterMode::Type& minFilter, FilterMode::Type& magFilter ) const
139 GetImplementation(*this).GetFilterMode( minFilter, magFilter );
142 RenderableActor::RenderableActor(Internal::RenderableActor* internal)