• 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 
22 namespace OHOS {
23 namespace Rosen {
24 class RSNode;
25 
26 class RSC_EXPORT RSModifierExtractor {
27 public:
28     RSModifierExtractor(NodeId id);
29     virtual ~RSModifierExtractor() = default;
30 
31     Vector4f GetBounds() const;
32     Vector4f GetFrame() const;
33     float GetPositionZ() const;
34 
35     Vector2f GetPivot() const;
36     float GetPivotZ() const;
37     Quaternion GetQuaternion() const;
38     float GetRotation() const;
39     float GetRotationX() const;
40     float GetRotationY() const;
41     float GetCameraDistance() const;
42     Vector2f GetTranslate() const;
43     float GetTranslateZ() const;
44     Vector2f GetScale() const;
45 
46     float GetAlpha() const;
47     bool GetAlphaOffscreen() const;
48 
49     Vector4f GetCornerRadius() const;
50 
51     Color GetForegroundColor() const;
52     Color GetBackgroundColor() const;
53     Color GetSurfaceBgColor() const;
54     std::shared_ptr<RSShader> GetBackgroundShader() const;
55     std::shared_ptr<RSImage> GetBgImage() const;
56     float GetBgImageWidth() const;
57     float GetBgImageHeight() const;
58     float GetBgImagePositionX() const;
59     float GetBgImagePositionY() const;
60 
61     Vector4<Color> GetBorderColor() const;
62     Vector4f GetBorderWidth() const;
63     Vector4<uint32_t> GetBorderStyle() const;
64 
65     std::shared_ptr<RSFilter> GetBackgroundFilter() const;
66     std::shared_ptr<RSFilter> GetFilter() const;
67 
68     Color GetShadowColor() const;
69     float GetShadowOffsetX() const;
70     float GetShadowOffsetY() const;
71     float GetShadowAlpha() const;
72     float GetShadowElevation() const;
73     float GetShadowRadius() const;
74     std::shared_ptr<RSPath> GetShadowPath() const;
75     bool GetShadowMask() const;
76 
77     Gravity GetFrameGravity() const;
78 
79     std::shared_ptr<RSPath> GetClipBounds() const;
80     bool GetClipToBounds() const;
81     bool GetClipToFrame() const;
82     bool GetVisible() const;
83 
84     std::shared_ptr<RSMask> GetMask() const;
85     float GetSpherizeDegree() const;
86     float GetLightUpEffectDegree() const;
87 
88     std::string Dump() const;
89 private:
90     NodeId id_;
91 };
92 } // namespace Rosen
93 } // namespace OHOS
94 
95 #endif // RENDER_SERVICE_CLIENT_CORE_MODIFIER_RS_MODIFIER_EXTRACTOR_H
96