2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
18 #include <dali/internal/event/actors/renderable-actor-impl.h>
21 #include <dali/public-api/object/type-registry.h>
22 #include <dali/internal/event/actor-attachments/renderable-attachment-impl.h>
24 namespace // unnamed namespace
30 * This may look like a no-op but maintains TypeRegistry chain of classes.
31 * ie if a child actor declares its base as RenderableActor, RenderableActor must exist
32 * in TypeRegistry otherwise it doesnt know that child is related to Actor.
39 TypeRegistration mType( typeid(Dali::RenderableActor), typeid(Dali::Actor), Create );
41 } // unnamed namespace
49 void RenderableActor::SetSortModifier(float modifier)
51 GetRenderableAttachment().SetSortModifier(modifier);
54 float RenderableActor::GetSortModifier() const
56 return GetRenderableAttachment().GetSortModifier();
59 void RenderableActor::SetCullFace(CullFaceMode mode)
61 GetRenderableAttachment().SetCullFace( mode );
64 CullFaceMode RenderableActor::GetCullFace() const
66 return GetRenderableAttachment().GetCullFace();
69 void RenderableActor::SetBlendMode( BlendingMode::Type mode )
71 GetRenderableAttachment().SetBlendMode( mode );
74 BlendingMode::Type RenderableActor::GetBlendMode() const
76 return GetRenderableAttachment().GetBlendMode();
79 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
81 GetRenderableAttachment().SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
84 void RenderableActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
85 BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
87 GetRenderableAttachment().SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
90 void RenderableActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
91 BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
93 GetRenderableAttachment().GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
96 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgba )
98 GetRenderableAttachment().SetBlendEquation( equationRgba, equationRgba );
101 void RenderableActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
103 GetRenderableAttachment().SetBlendEquation( equationRgb, equationAlpha );
106 void RenderableActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
108 GetRenderableAttachment().GetBlendEquation( equationRgb, equationAlpha );
111 void RenderableActor::SetBlendColor( const Vector4& color )
113 GetRenderableAttachment().SetBlendColor( color );
116 const Vector4& RenderableActor::GetBlendColor() const
118 return GetRenderableAttachment().GetBlendColor();
121 RenderableActor::RenderableActor()
122 : Actor( Actor::RENDERABLE )
126 RenderableActor::~RenderableActor()
130 } // namespace Internal