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 UIEFFECT_FILTER_PARA_H
16 #define UIEFFECT_FILTER_PARA_H
17 
18 #include <iostream>
19 #include <map>
20 
21 namespace OHOS {
22 namespace Rosen {
23 enum class TileMode : uint32_t {
24     CLAMP = 0,
25     REPEAT = 1,
26     MIRROR = 2,
27     DECAL = 3,
28 };
29 
30 const std::map<std::string, TileMode> STRING_TO_JS_MAP = {
31     { "CLAMP", TileMode::CLAMP },
32     { "REPEAT", TileMode::REPEAT },
33     { "MIRROR", TileMode::MIRROR },
34     { "DECAL", TileMode::DECAL },
35 };
36 
37 class FilterPara {
38 public:
39     enum ParaType {
40         NONE,
41         BLUR,
42         PIXEL_STRETCH,
43         WATER_RIPPLE,
44         FLY_OUT,
45         DISTORT,
46     };
47 
48     FilterPara()  = default;
49     virtual ~FilterPara() = default;
GetParaType()50     ParaType GetParaType()
51     {
52         return type_;
53     }
54 protected:
55     ParaType type_;
56 };
57 } // namespace Rosen
58 } // namespace OHOS
59 #endif // UIEFFECT_FILTER_PARA_H
60