• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_hdr_brightness_modifier.h"
17 
18 namespace OHOS::Rosen::ModifierNG {
SetHDRBrightness(float hdrBrightness)19 void RSHDRBrightnessModifier::SetHDRBrightness(float hdrBrightness)
20 {
21     Setter(RSPropertyType::HDR_BRIGHTNESS, hdrBrightness);
22 }
23 
GetHDRBrightness() const24 float RSHDRBrightnessModifier::GetHDRBrightness() const
25 {
26     return Getter(RSPropertyType::HDR_BRIGHTNESS, 1.f);
27 }
28 
SetHDRUIBrightness(float brightness)29 void RSHDRBrightnessModifier::SetHDRUIBrightness(float brightness)
30 {
31     Setter(RSPropertyType::HDR_UI_BRIGHTNESS, brightness);
32 }
33 
GetHDRUIBrightness() const34 float RSHDRBrightnessModifier::GetHDRUIBrightness() const
35 {
36     return Getter(RSPropertyType::HDR_UI_BRIGHTNESS, 1.f);
37 }
38 
SetHDRBrightnessFactor(float factor)39 void RSHDRBrightnessModifier::SetHDRBrightnessFactor(float factor)
40 {
41     Setter(RSPropertyType::HDR_BRIGHTNESS_FACTOR, factor);
42 }
43 
GetHDRBrightnessFactor() const44 float RSHDRBrightnessModifier::GetHDRBrightnessFactor() const
45 {
46     return Getter(RSPropertyType::HDR_BRIGHTNESS_FACTOR, 1.f);
47 }
48 } // namespace OHOS::Rosen::ModifierNG
49