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 
16 #include "ge_visual_effect.h"
17 
18 #include "ge_log.h"
19 #include "ge_visual_effect_impl.h"
20 
21 namespace OHOS {
22 namespace Rosen {
23 namespace Drawing {
24 
GEVisualEffect(const std::string & name,DrawingPaintType type)25 GEVisualEffect::GEVisualEffect(const std::string& name, DrawingPaintType type)
26     : visualEffectName_(name), type_(type), visualEffectImpl_(std::make_unique<GEVisualEffectImpl>(name))
27 {}
28 
~GEVisualEffect()29 GEVisualEffect::~GEVisualEffect() {}
30 
SetParam(const std::string & tag,int32_t param)31 void GEVisualEffect::SetParam(const std::string& tag, int32_t param)
32 {
33     (void)type_;
34     visualEffectImpl_->SetParam(tag, param);
35 }
36 
SetParam(const std::string & tag,int64_t param)37 void GEVisualEffect::SetParam(const std::string& tag, int64_t param)
38 {
39     visualEffectImpl_->SetParam(tag, param);
40 }
41 
SetParam(const std::string & tag,float param)42 void GEVisualEffect::SetParam(const std::string& tag, float param)
43 {
44     visualEffectImpl_->SetParam(tag, param);
45 }
46 
SetParam(const std::string & tag,double param)47 void GEVisualEffect::SetParam(const std::string& tag, double param)
48 {
49     visualEffectImpl_->SetParam(tag, param);
50 }
51 
SetParam(const std::string & tag,const char * const param)52 void GEVisualEffect::SetParam(const std::string& tag, const char* const param)
53 {
54     visualEffectImpl_->SetParam(tag, param);
55 }
56 
SetParam(const std::string & tag,const Drawing::Matrix param)57 void GEVisualEffect::SetParam(const std::string& tag, const Drawing::Matrix param)
58 {
59     visualEffectImpl_->SetParam(tag, param);
60 }
61 
SetParam(const std::string & tag,const std::vector<std::pair<float,float>> param)62 void GEVisualEffect::SetParam(const std::string& tag, const std::vector<std::pair<float, float>> param)
63 {
64     visualEffectImpl_->SetParam(tag, param);
65 }
66 
SetParam(const std::string & tag,bool param)67 void GEVisualEffect::SetParam(const std::string& tag, bool param)
68 {
69     visualEffectImpl_->SetParam(tag, param);
70 }
71 
SetParam(const std::string & tag,uint32_t param)72 void GEVisualEffect::SetParam(const std::string& tag, uint32_t param)
73 {
74     visualEffectImpl_->SetParam(tag, param);
75 }
76 
77 } // namespace Drawing
78 } // namespace Rosen
79 } // namespace OHOS
80