1 /*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "modifier_ng/appearance/rs_behind_window_filter_modifier.h"
17
18 namespace OHOS::Rosen::ModifierNG {
SetBehindWindowFilterRadius(float behindWindowFilterRadius)19 void RSBehindWindowFilterModifier::SetBehindWindowFilterRadius(float behindWindowFilterRadius)
20 {
21 Setter(RSPropertyType::BEHIND_WINDOW_FILTER_RADIUS, behindWindowFilterRadius);
22 }
23
GetBehindWindowFilterRadius() const24 float RSBehindWindowFilterModifier::GetBehindWindowFilterRadius() const
25 {
26 return Getter(RSPropertyType::BEHIND_WINDOW_FILTER_RADIUS, 0.f);
27 }
28
SetBehindWindowFilterSaturation(float behindWindowFilterSaturation)29 void RSBehindWindowFilterModifier::SetBehindWindowFilterSaturation(float behindWindowFilterSaturation)
30 {
31 Setter(RSPropertyType::BEHIND_WINDOW_FILTER_SATURATION, behindWindowFilterSaturation);
32 }
33
GetBehindWindowFilterSaturation() const34 float RSBehindWindowFilterModifier::GetBehindWindowFilterSaturation() const
35 {
36 return Getter(RSPropertyType::BEHIND_WINDOW_FILTER_SATURATION, 0.f);
37 }
38
SetBehindWindowFilterBrightness(float behindWindowFilterBrightness)39 void RSBehindWindowFilterModifier::SetBehindWindowFilterBrightness(float behindWindowFilterBrightness)
40 {
41 Setter(RSPropertyType::BEHIND_WINDOW_FILTER_BRIGHTNESS, behindWindowFilterBrightness);
42 }
43
GetBehindWindowFilterBrightness() const44 float RSBehindWindowFilterModifier::GetBehindWindowFilterBrightness() const
45 {
46 return Getter(RSPropertyType::BEHIND_WINDOW_FILTER_BRIGHTNESS, 0.f);
47 }
48
SetBehindWindowFilterMaskColor(const Color behindWindowFilterMaskColor)49 void RSBehindWindowFilterModifier::SetBehindWindowFilterMaskColor(const Color behindWindowFilterMaskColor)
50 {
51 Setter(RSPropertyType::BEHIND_WINDOW_FILTER_MASK_COLOR, behindWindowFilterMaskColor);
52 }
53
GetBehindWindowFilterMaskColor() const54 Color RSBehindWindowFilterModifier::GetBehindWindowFilterMaskColor() const
55 {
56 return Getter(RSPropertyType::BEHIND_WINDOW_FILTER_MASK_COLOR, Color(RgbPalette::Transparent()));
57 }
58 } // namespace OHOS::Rosen::ModifierNG
59