• 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_point_light_modifier.h"
17 
18 namespace OHOS::Rosen::ModifierNG {
SetLightIntensity(float lightIntensity)19 void RSPointLightModifier::SetLightIntensity(float lightIntensity)
20 {
21     Setter(RSPropertyType::LIGHT_INTENSITY, lightIntensity);
22 }
23 
GetLightIntensity() const24 float RSPointLightModifier::GetLightIntensity() const
25 {
26     return Getter<float>(RSPropertyType::LIGHT_INTENSITY, {});
27 }
28 
SetLightColor(const Color lightColor)29 void RSPointLightModifier::SetLightColor(const Color lightColor)
30 {
31     Setter(RSPropertyType::LIGHT_COLOR, lightColor);
32 }
33 
GetLightColor() const34 Color RSPointLightModifier::GetLightColor() const
35 {
36     return Getter<Color>(RSPropertyType::LIGHT_COLOR, {});
37 }
38 
SetLightPosition(const Vector4f & lightPosition)39 void RSPointLightModifier::SetLightPosition(const Vector4f& lightPosition)
40 {
41     Setter(RSPropertyType::LIGHT_POSITION, lightPosition);
42 }
43 
GetLightPosition() const44 Vector4f RSPointLightModifier::GetLightPosition() const
45 {
46     return Getter<Vector4f>(RSPropertyType::LIGHT_POSITION, {});
47 }
48 
SetIlluminatedBorderWidth(float illuminatedBorderWidth)49 void RSPointLightModifier::SetIlluminatedBorderWidth(float illuminatedBorderWidth)
50 {
51     Setter(RSPropertyType::ILLUMINATED_BORDER_WIDTH, illuminatedBorderWidth);
52 }
53 
GetIlluminatedBorderWidth() const54 float RSPointLightModifier::GetIlluminatedBorderWidth() const
55 {
56     return Getter<float>(RSPropertyType::ILLUMINATED_BORDER_WIDTH, {});
57 }
58 
SetIlluminatedType(int illuminatedType)59 void RSPointLightModifier::SetIlluminatedType(int illuminatedType)
60 {
61     Setter<RSProperty>(RSPropertyType::ILLUMINATED_TYPE, illuminatedType);
62 }
63 
GetIlluminatedType() const64 int RSPointLightModifier::GetIlluminatedType() const
65 {
66     return Getter<int>(RSPropertyType::ILLUMINATED_TYPE, {});
67 }
68 
SetBloom(float bloomIntensity)69 void RSPointLightModifier::SetBloom(float bloomIntensity)
70 {
71     Setter(RSPropertyType::BLOOM, bloomIntensity);
72 }
73 
GetBloom() const74 float RSPointLightModifier::GetBloom() const
75 {
76     return Getter<float>(RSPropertyType::BLOOM, {});
77 }
78 } // namespace OHOS::Rosen::ModifierNG