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-toolkit/public-api/controls/shadow-view/shadow-view.h>
21 #include <dali-toolkit/internal/controls/shadow-view/shadow-view-impl.h>
26 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE = 1.0f;
27 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE = 1.0f;
37 ShadowView::ShadowView()
41 ShadowView::~ShadowView()
45 ShadowView::ShadowView(const ShadowView& handle)
50 ShadowView& ShadowView::operator=(const ShadowView& rhs)
54 Control::operator=(rhs);
59 ShadowView ShadowView::New()
61 return Internal::ShadowView::New(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE,
62 GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE);
65 ShadowView ShadowView::New(float downsampleWidthScale, float downsampleHeightScale)
67 return Internal::ShadowView::New(downsampleWidthScale, downsampleHeightScale);
70 ShadowView::ShadowView( Internal::ShadowView& implementation )
71 : Control( implementation )
75 ShadowView::ShadowView( Dali::Internal::CustomActor* internal )
78 VerifyCustomActorPointer<Internal::ShadowView>(internal);
81 ShadowView ShadowView::DownCast( BaseHandle handle )
83 return Control::DownCast<ShadowView, Internal::ShadowView>(handle);
86 void ShadowView::Add(Actor child)
88 GetImpl(*this).Add(child);
91 void ShadowView::Remove(Actor child)
93 GetImpl(*this).Remove(child);
96 void ShadowView::SetShadowPlane(ImageActor shadowPlane)
98 GetImpl(*this).SetShadowPlane(shadowPlane);
101 void ShadowView::SetPointLight(Actor pointLight)
103 GetImpl(*this).SetPointLight(pointLight);
106 void ShadowView::SetPointLightFieldOfView(float fieldOfView)
108 GetImpl(*this).SetPointLightFieldOfView(fieldOfView);
111 void ShadowView::SetShadowColor(Vector4 color)
113 GetImpl(*this).SetShadowColor(color);
116 void ShadowView::Activate()
118 GetImpl(*this).Activate();
121 void ShadowView::Deactivate()
123 GetImpl(*this).Deactivate();
126 Property::Index ShadowView::GetBlurStrengthPropertyIndex() const
128 return GetImpl(*this).GetBlurStrengthPropertyIndex();
131 Property::Index ShadowView::GetShadowColorPropertyIndex() const
133 return GetImpl(*this).GetShadowColorPropertyIndex();
136 } // namespace Toolkit