1 /*
2  * Copyright (c) 2024 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 #ifndef SDF_SHAPER_BASE_H
16 #define SDF_SHAPER_BASE_H
17 
18 #include "common/rs_macros.h"
19 #include "utils/drawing_macros.h"
20 #include <memory>
21 #include <vector>
22 
23 namespace OHOS {
24 namespace Rosen {
25 namespace Drawing {
26 
27 class DRAWING_API SDFShapeBase
28 {
29 public:
SDFShapeBase()30     SDFShapeBase() {};
~SDFShapeBase()31     virtual ~SDFShapeBase() {};
32 
33     virtual std::string Getshader() const = 0;
34     virtual float GetSize() const = 0;
35     virtual void SetSize(float size) = 0;
36     virtual void SetTranslate(float dx, float dy) = 0;
37     virtual float GetTranslateX() const = 0;
38     virtual float GetTranslateY() const = 0;
39 
40     virtual int GetParaNum() const = 0;
41     virtual int GetFillType() const = 0;
42     virtual std::vector<float> GetPara() const = 0;
43     virtual std::vector<float> GetTransPara() const = 0;
44 
45     virtual std::vector<float> GetColorPara() const = 0;
46 
47     virtual void UpdateTime(float time) = 0;
48     virtual void BuildShader() = 0;
49 
50 private:
51 
52 };
53 } // namespace Drawing
54 } // namespace Rosen
55 } // namespace OHOS
56 
57 #endif // RENDER_SERVICE_CLIENT_CORE_PROPERTY_RS_SDF_SHAPER_BASE_H