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/internal/event/actors/renderable-actor-impl.h>
22 #include <dali/public-api/object/type-registry.h>
23 #include <dali/internal/event/actor-attachments/renderable-attachment-impl.h>
25 namespace // unnamed namespace
31 * This may look like a no-op but maintains TypeRegistry chain of classes.
32 * ie if a child actor declares its base as RenderableActor, RenderableActor must exist
33 * in TypeRegistry otherwise it doesnt know that child is related to Actor.
40 TypeRegistration mType( typeid(Dali::RenderableActor), typeid(Dali::Actor), Create );
42 } // unnamed namespace
50 void RenderableActor::SetSortModifier(float modifier)
52 GetRenderableAttachment().SetSortModifier(modifier);
55 float RenderableActor::GetSortModifier() const
57 return GetRenderableAttachment().GetSortModifier();
60 void RenderableActor::SetCullFace(CullFaceMode mode)
62 GetRenderableAttachment().SetCullFace( mode );
65 CullFaceMode RenderableActor::GetCullFace() const
67 return GetRenderableAttachment().GetCullFace();
70 void RenderableActor::SetBlendMode( BlendingMode::Type mode )
72 GetRenderableAttachment().SetBlendMode( mode );
75 BlendingMode::Type RenderableActor::GetBlendMode() const
77 return GetRenderableAttachment().GetBlendMode();
80 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
82 GetRenderableAttachment().SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
85 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
86 BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
88 GetRenderableAttachment().SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
91 void RenderableActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
92 BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
94 GetRenderableAttachment().GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
97 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgba )
99 GetRenderableAttachment().SetBlendEquation( equationRgba, equationRgba );
102 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
104 GetRenderableAttachment().SetBlendEquation( equationRgb, equationAlpha );
107 void RenderableActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
109 GetRenderableAttachment().GetBlendEquation( equationRgb, equationAlpha );
112 void RenderableActor::SetBlendColor( const Vector4& color )
114 GetRenderableAttachment().SetBlendColor( color );
117 const Vector4& RenderableActor::GetBlendColor() const
119 return GetRenderableAttachment().GetBlendColor();
122 RenderableActor::RenderableActor()
123 : Actor( Actor::RENDERABLE )
127 RenderableActor::~RenderableActor()
131 } // namespace Internal