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-toolkit/public-api/controls/shadow-view/shadow-view.h>
22 #include <dali-toolkit/internal/controls/shadow-view/shadow-view-impl.h>
27 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE = 1.0f;
28 const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE = 1.0f;
38 ShadowView::ShadowView()
42 ShadowView::~ShadowView()
46 ShadowView::ShadowView(const ShadowView& handle)
51 ShadowView& ShadowView::operator=(const ShadowView& rhs)
55 Control::operator=(rhs);
60 ShadowView ShadowView::New()
62 return Internal::ShadowView::New(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE,
63 GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE);
66 ShadowView ShadowView::New(float downsampleWidthScale, float downsampleHeightScale)
68 return Internal::ShadowView::New(downsampleWidthScale, downsampleHeightScale);
71 ShadowView::ShadowView( Internal::ShadowView& implementation )
72 : Control( implementation )
76 ShadowView::ShadowView( Dali::Internal::CustomActor* internal )
79 VerifyCustomActorPointer<Internal::ShadowView>(internal);
82 ShadowView ShadowView::DownCast( BaseHandle handle )
84 return Control::DownCast<ShadowView, Internal::ShadowView>(handle);
87 void ShadowView::Add(Actor child)
89 GetImpl(*this).Add(child);
92 void ShadowView::Remove(Actor child)
94 GetImpl(*this).Remove(child);
97 void ShadowView::SetShadowPlane(ImageActor shadowPlane)
99 GetImpl(*this).SetShadowPlane(shadowPlane);
102 void ShadowView::SetPointLight(Actor pointLight)
104 GetImpl(*this).SetPointLight(pointLight);
107 void ShadowView::SetPointLightFieldOfView(float fieldOfView)
109 GetImpl(*this).SetPointLightFieldOfView(fieldOfView);
112 void ShadowView::SetShadowColor(Vector4 color)
114 GetImpl(*this).SetShadowColor(color);
117 void ShadowView::Activate()
119 GetImpl(*this).Activate();
122 void ShadowView::Deactivate()
124 GetImpl(*this).Deactivate();
127 Property::Index ShadowView::GetBlurStrengthPropertyIndex() const
129 return GetImpl(*this).GetBlurStrengthPropertyIndex();
132 Property::Index ShadowView::GetShadowColorPropertyIndex() const
134 return GetImpl(*this).GetShadowColorPropertyIndex();
137 } // namespace Toolkit