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_MOCK_ROSEN_TEST_TESTING_SHADER_EFFECT_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_SHADER_EFFECT_H 18 19 #include <memory> 20 21 #include "testing_color.h" 22 #include "testing_point.h" 23 24 namespace OHOS::Ace::Testing { 25 enum class TileMode { 26 CLAMP, 27 REPEAT, 28 MIRROR, 29 DECAL, 30 }; 31 class TestingShaderEffect { 32 public: 33 TestingShaderEffect() = default; 34 ~TestingShaderEffect() = default; 35 CreateSweepGradient(const TestingPoint &,const std::vector<uint32_t> &,const std::vector<float> &,TileMode,float,float)36 static std::shared_ptr<TestingShaderEffect> CreateSweepGradient(const TestingPoint& /* centerPt */, 37 const std::vector<uint32_t>& /* colors */, const std::vector<float>& /* pos */, TileMode /* mode */, 38 float /* startAngle */, float /* endAngle */) 39 { 40 return std::make_shared<TestingShaderEffect>(); 41 } 42 CreateLinearGradient(const TestingPoint &,const TestingPoint &,const std::vector<uint32_t> &,const std::vector<float> &,TileMode)43 static std::shared_ptr<TestingShaderEffect> CreateLinearGradient(const TestingPoint& /* startPt */, 44 const TestingPoint& /* endPt */, const std::vector<uint32_t>& /* colors */, const std::vector<float>& /* pos */, 45 TileMode /* mode */) 46 { 47 return std::make_shared<TestingShaderEffect>(); 48 } 49 }; 50 } // namespace OHOS::Ace::Testing 51 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_SHADER_EFFECT_H 52