2 * Copyright (c) 2022 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) = default;
45 ShadowView& ShadowView::operator=(const ShadowView& handle) = default;
47 ShadowView::ShadowView(ShadowView&& rhs) = default;
49 ShadowView& ShadowView::operator=(ShadowView&& rhs) = default;
51 ShadowView ShadowView::New()
53 return Internal::ShadowView::New(GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_WIDTH_SCALE,
54 GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE);
57 ShadowView ShadowView::New(float downsampleWidthScale, float downsampleHeightScale)
59 return Internal::ShadowView::New(downsampleWidthScale, downsampleHeightScale);
62 ShadowView::ShadowView(Internal::ShadowView& implementation)
63 : Control(implementation)
67 ShadowView::ShadowView(Dali::Internal::CustomActor* internal)
70 VerifyCustomActorPointer<Internal::ShadowView>(internal);
73 ShadowView ShadowView::DownCast(BaseHandle handle)
75 return Control::DownCast<ShadowView, Internal::ShadowView>(handle);
78 void ShadowView::SetShadowPlaneBackground(Actor shadowPlaneBackground)
80 GetImpl(*this).SetShadowPlaneBackground(shadowPlaneBackground);
83 void ShadowView::SetPointLight(Actor pointLight)
85 GetImpl(*this).SetPointLight(pointLight);
88 void ShadowView::SetPointLightFieldOfView(float fieldOfView)
90 GetImpl(*this).SetPointLightFieldOfView(fieldOfView);
93 void ShadowView::SetShadowColor(Vector4 color)
95 GetImpl(*this).SetShadowColor(color);
98 void ShadowView::Activate()
100 GetImpl(*this).Activate();
103 void ShadowView::Deactivate()
105 GetImpl(*this).Deactivate();
108 Property::Index ShadowView::GetBlurStrengthPropertyIndex() const
110 return GetImpl(*this).GetBlurStrengthPropertyIndex();
113 Property::Index ShadowView::GetShadowColorPropertyIndex() const
115 return GetImpl(*this).GetShadowColorPropertyIndex();
118 } // namespace Toolkit