1 /*
2  * Copyright (c) 2022 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 FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PAINTS_NODE_PAINT_METHOD_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PAINTS_NODE_PAINT_METHOD_H
18 
19 #include "base/memory/ace_type.h"
20 #include "base/utils/macros.h"
21 #include "core/components_ng/render/paint_wrapper.h"
22 namespace OHOS::Ace::NG {
23 class Modifier;
24 class NodePaintMethod : public virtual AceType {
25     DECLARE_ACE_TYPE(NodePaintMethod, AceType)
26 
27 public:
28     NodePaintMethod() = default;
29     ~NodePaintMethod() override = default;
30 
GetContentDrawFunction(PaintWrapper * paintWrapper)31     virtual CanvasDrawFunction GetContentDrawFunction(PaintWrapper* paintWrapper)
32     {
33         return nullptr;
34     }
35 
GetForegroundDrawFunction(PaintWrapper * paintWrapper)36     virtual CanvasDrawFunction GetForegroundDrawFunction(PaintWrapper* paintWrapper)
37     {
38         return nullptr;
39     }
40 
GetOverlayDrawFunction(PaintWrapper * paintWrapper)41     virtual CanvasDrawFunction GetOverlayDrawFunction(PaintWrapper* paintWrapper)
42     {
43         return nullptr;
44     }
45 
GetContentModifier(PaintWrapper * paintWrapper)46     virtual RefPtr<Modifier> GetContentModifier(PaintWrapper* paintWrapper)
47     {
48         return nullptr;
49     }
50 
GetOverlayModifier(PaintWrapper * paintWrapper)51     virtual RefPtr<Modifier> GetOverlayModifier(PaintWrapper* paintWrapper)
52     {
53         return nullptr;
54     }
55 
GetForegroundModifier(PaintWrapper * paintWrapper)56     virtual RefPtr<Modifier> GetForegroundModifier(PaintWrapper* paintWrapper)
57     {
58         return nullptr;
59     }
60 
UpdateContentModifier(PaintWrapper * paintWrapper)61     virtual void UpdateContentModifier(PaintWrapper* paintWrapper) {}
62 
UpdateForegroundModifier(PaintWrapper * paintWrapper)63     virtual void UpdateForegroundModifier(PaintWrapper* paintWrapper) {}
64 
UpdateOverlayModifier(PaintWrapper * paintWrapper)65     virtual void UpdateOverlayModifier(PaintWrapper* paintWrapper) {}
66 };
67 } // namespace OHOS::Ace::NG
68 
69 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PAINTS_NODE_PAINT_METHOD_H
70