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_WATER_RIPPPLE_PARA_H
16 #define UIEFFECT_FILTER_WATER_RIPPPLE_PARA_H
17 #include <iostream>
18 #include "filter_para.h"
19 #include "common/rs_vector2.h"
20 
21 namespace OHOS {
22 namespace Rosen {
23 class WaterRipplePara : public FilterPara {
24 public:
WaterRipplePara()25     WaterRipplePara()
26     {
27         this->type_ = FilterPara::ParaType::WATER_RIPPLE;
28     }
29     ~WaterRipplePara() override = default;
30 
SetProgress(float progress)31     void SetProgress(float progress)
32     {
33         progress_ = progress;
34     }
35 
GetProgress()36     float GetProgress() const
37     {
38         return progress_;
39     }
40 
SetWaveCount(uint32_t waveCount)41     void SetWaveCount(uint32_t waveCount)
42     {
43         waveCount_ = waveCount;
44     }
45 
GetWaveCount()46     uint32_t GetWaveCount () const
47     {
48         return waveCount_;
49     }
50 
SetRippleCenterX(float rippleCenterX)51     void SetRippleCenterX(float rippleCenterX)
52     {
53         rippleCenterX_ = rippleCenterX;
54     }
55 
GetRippleCenterX()56     float GetRippleCenterX() const
57     {
58         return rippleCenterX_;
59     }
60 
SetRippleCenterY(float rippleCenterY)61     void SetRippleCenterY(float rippleCenterY)
62     {
63         rippleCenterY_ = rippleCenterY;
64     }
65 
GetRippleCenterY()66     float GetRippleCenterY() const
67     {
68         return rippleCenterY_;
69     }
70 
SetRippleMode(uint32_t rippleMode)71     void SetRippleMode(uint32_t rippleMode)
72     {
73         rippleMode_ = rippleMode;
74     }
75 
GetRippleMode()76     uint32_t GetRippleMode() const
77     {
78         return rippleMode_;
79     }
80 
81 private:
82     float rippleCenterX_ = 0.0f;
83     float rippleCenterY_ = 0.0f;
84     float progress_ = 0.0f;
85     uint32_t waveCount_ = 0;
86     uint32_t rippleMode_ = 0;
87 };
88 } // namespace Rosen
89 } // namespace OHOS
90 #endif // UIEFFECT_FILTER_WATER_RIPPPLE_PARA_H
91