[dali_2.3.20] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / bloom-view / bloom-view.cpp
1 /*
2  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/bloom-view/bloom-view-impl.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 BloomView::BloomView()
29 {
30 }
31
32 BloomView::~BloomView()
33 {
34 }
35
36 BloomView::BloomView(const BloomView& handle) = default;
37
38 BloomView& BloomView::operator=(const BloomView& rhs) = default;
39
40 BloomView::BloomView(BloomView&& handle) = default;
41
42 BloomView& BloomView::operator=(BloomView&& rhs) = default;
43
44 BloomView BloomView::New()
45 {
46   return Internal::BloomView::New();
47 }
48
49 BloomView BloomView::New(const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat, const float downsampleWidthScale, const float downsampleHeightScale)
50 {
51   return Internal::BloomView::New(numSamples, blurBellCurveWidth, renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale);
52 }
53
54 BloomView::BloomView(Internal::BloomView& implementation)
55 : Control(implementation)
56 {
57 }
58
59 BloomView::BloomView(Dali::Internal::CustomActor* internal)
60 : Control(internal)
61 {
62   VerifyCustomActorPointer<Internal::BloomView>(internal);
63 }
64
65 BloomView BloomView::DownCast(BaseHandle handle)
66 {
67   return Control::DownCast<BloomView, Internal::BloomView>(handle);
68 }
69
70 void BloomView::Activate()
71 {
72   GetImpl(*this).Activate();
73 }
74
75 void BloomView::Deactivate()
76 {
77   GetImpl(*this).Deactivate();
78 }
79
80 Property::Index BloomView::GetBloomThresholdPropertyIndex() const
81 {
82   return GetImpl(*this).GetBloomThresholdPropertyIndex();
83 }
84
85 Property::Index BloomView::GetBlurStrengthPropertyIndex() const
86 {
87   return GetImpl(*this).GetBlurStrengthPropertyIndex();
88 }
89
90 Property::Index BloomView::GetBloomIntensityPropertyIndex() const
91 {
92   return GetImpl(*this).GetBloomIntensityPropertyIndex();
93 }
94
95 Property::Index BloomView::GetBloomSaturationPropertyIndex() const
96 {
97   return GetImpl(*this).GetBloomSaturationPropertyIndex();
98 }
99
100 Property::Index BloomView::GetImageIntensityPropertyIndex() const
101 {
102   return GetImpl(*this).GetImageIntensityPropertyIndex();
103 }
104
105 Property::Index BloomView::GetImageSaturationPropertyIndex() const
106 {
107   return GetImpl(*this).GetImageSaturationPropertyIndex();
108 }
109
110 } // namespace Toolkit
111
112 } // namespace Dali