2 * Copyright (c) 2015 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>
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::SetShadowPlaneBackground(Actor shadowPlaneBackground)
89 GetImpl(*this).SetShadowPlaneBackground(shadowPlaneBackground);
92 void ShadowView::SetPointLight(Actor pointLight)
94 GetImpl(*this).SetPointLight(pointLight);
97 void ShadowView::SetPointLightFieldOfView(float fieldOfView)
99 GetImpl(*this).SetPointLightFieldOfView(fieldOfView);
102 void ShadowView::SetShadowColor(Vector4 color)
104 GetImpl(*this).SetShadowColor(color);
107 void ShadowView::Activate()
109 GetImpl(*this).Activate();
112 void ShadowView::Deactivate()
114 GetImpl(*this).Deactivate();
117 Property::Index ShadowView::GetBlurStrengthPropertyIndex() const
119 return GetImpl(*this).GetBlurStrengthPropertyIndex();
122 Property::Index ShadowView::GetShadowColorPropertyIndex() const
124 return GetImpl(*this).GetShadowColorPropertyIndex();
127 } // namespace Toolkit