• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 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 #ifndef RENDER_SERVICE_CLIENT_CORE_MODIFIER_RS_MODIFIER_EXTRACTOR_H
17 #define RENDER_SERVICE_CLIENT_CORE_MODIFIER_RS_MODIFIER_EXTRACTOR_H
18 
19 #include "common/rs_common_def.h"
20 #include "property/rs_properties.h"
21 #include "property/rs_properties_def.h"
22 
23 namespace OHOS {
24 namespace Rosen {
25 class RSNode;
26 
27 class RSC_EXPORT RSModifierExtractor {
28 public:
29     RSModifierExtractor(NodeId id);
30     virtual ~RSModifierExtractor() = default;
31 
32     Vector4f GetBounds() const;
33     Vector4f GetFrame() const;
34     float GetPositionZ() const;
35 
36     Vector2f GetPivot() const;
37     float GetPivotZ() const;
38     Quaternion GetQuaternion() const;
39     float GetRotation() const;
40     float GetRotationX() const;
41     float GetRotationY() const;
42     float GetCameraDistance() const;
43     Vector2f GetTranslate() const;
44     float GetTranslateZ() const;
45     Vector2f GetScale() const;
46 
47     float GetAlpha() const;
48     bool GetAlphaOffscreen() const;
49 
50     Vector4f GetCornerRadius() const;
51 
52     Color GetForegroundColor() const;
53     Color GetBackgroundColor() const;
54     Color GetSurfaceBgColor() const;
55     std::shared_ptr<RSShader> GetBackgroundShader() const;
56     std::shared_ptr<RSImage> GetBgImage() const;
57     float GetBgImageWidth() const;
58     float GetBgImageHeight() const;
59     float GetBgImagePositionX() const;
60     float GetBgImagePositionY() const;
61 
62     Vector4<Color> GetBorderColor() const;
63     Vector4f GetBorderWidth() const;
64     Vector4<uint32_t> GetBorderStyle() const;
65     Vector4<Color> GetOutlineColor() const;
66     Vector4f GetOutlineWidth() const;
67     Vector4<uint32_t> GetOutlineStyle() const;
68     Vector4f GetOutlineRadius() const;
69 
70     std::shared_ptr<RSFilter> GetBackgroundFilter() const;
71     std::shared_ptr<RSFilter> GetFilter() const;
72 
73     Color GetShadowColor() const;
74     float GetShadowOffsetX() const;
75     float GetShadowOffsetY() const;
76     float GetShadowAlpha() const;
77     float GetShadowElevation() const;
78     float GetShadowRadius() const;
79     std::shared_ptr<RSPath> GetShadowPath() const;
80     bool GetShadowMask() const;
81     bool GetShadowIsFilled() const;
82     int GetShadowColorStrategy() const;
83 
84     Gravity GetFrameGravity() const;
85 
86     std::shared_ptr<RSPath> GetClipBounds() const;
87     bool GetClipToBounds() const;
88     bool GetClipToFrame() const;
89     bool GetVisible() const;
90 
91     std::shared_ptr<RSMask> GetMask() const;
92     float GetSpherizeDegree() const;
93     float GetLightUpEffectDegree() const;
94 
95     float GetLightIntensity() const;
96     Vector4f GetLightPosition() const;
97     float GetIlluminatedBorderWidth() const;
98     int GetIlluminatedType() const;
99     float GetBloom() const;
100 
101     std::string Dump() const;
102 private:
103     NodeId id_;
104 };
105 } // namespace Rosen
106 } // namespace OHOS
107 
108 #endif // RENDER_SERVICE_CLIENT_CORE_MODIFIER_RS_MODIFIER_EXTRACTOR_H
109