2 * Copyright (c) 2020 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/devel-api/controls/shadow-view/shadow-view.h>
22 #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;
35 ShadowView::ShadowView()
39 ShadowView::~ShadowView()
43 ShadowView::ShadowView(const ShadowView& handle)
48 ShadowView& ShadowView::operator=(const ShadowView& rhs)
52 Control::operator=(rhs);
57 ShadowView ShadowView::New()
59 return Internal::ShadowView::New(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE,
60 GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE);
63 ShadowView ShadowView::New(float downsampleWidthScale, float downsampleHeightScale)
65 return Internal::ShadowView::New(downsampleWidthScale, downsampleHeightScale);
68 ShadowView::ShadowView(Internal::ShadowView& implementation)
69 : Control(implementation)
73 ShadowView::ShadowView(Dali::Internal::CustomActor* internal)
76 VerifyCustomActorPointer<Internal::ShadowView>(internal);
79 ShadowView ShadowView::DownCast(BaseHandle handle)
81 return Control::DownCast<ShadowView, Internal::ShadowView>(handle);
84 void ShadowView::SetShadowPlaneBackground(Actor shadowPlaneBackground)
86 GetImpl(*this).SetShadowPlaneBackground(shadowPlaneBackground);
89 void ShadowView::SetPointLight(Actor pointLight)
91 GetImpl(*this).SetPointLight(pointLight);
94 void ShadowView::SetPointLightFieldOfView(float fieldOfView)
96 GetImpl(*this).SetPointLightFieldOfView(fieldOfView);
99 void ShadowView::SetShadowColor(Vector4 color)
101 GetImpl(*this).SetShadowColor(color);
104 void ShadowView::Activate()
106 GetImpl(*this).Activate();
109 void ShadowView::Deactivate()
111 GetImpl(*this).Deactivate();
114 Property::Index ShadowView::GetBlurStrengthPropertyIndex() const
116 return GetImpl(*this).GetBlurStrengthPropertyIndex();
119 Property::Index ShadowView::GetShadowColorPropertyIndex() const
121 return GetImpl(*this).GetShadowColorPropertyIndex();
124 } // namespace Toolkit