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_BRUSH_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_BRUSH_H 18 19 #include <memory> 20 21 #include "testing_color.h" 22 #include "testing_filter.h" 23 #include "testing_shader_effect.h" 24 25 namespace OHOS::Ace::Testing { 26 enum class BlendMode { 27 CLEAR, 28 SRC, 29 DST, 30 SRC_OVER, 31 DST_OVER, 32 SRC_IN, 33 DST_IN, 34 SRC_OUT, 35 DST_OUT, 36 SRC_ATOP, 37 DST_ATOP, 38 XOR, 39 PLUS, 40 MODULATE, 41 SCREEN, 42 OVERLAY, 43 DARKEN, 44 LIGHTEN, 45 COLOR_DODGE, 46 COLOR_BURN, 47 HARD_LIGHT, 48 SOFT_LIGHT, 49 DIFFERENCE, 50 EXCLUSION, 51 MULTIPLY, 52 HUE, 53 STATURATION, 54 COLOR, 55 LUMINOSITY, 56 }; 57 class TestingBrush { 58 public: 59 TestingBrush() = default; 60 ~TestingBrush() = default; TestingBrush(int rgba)61 explicit TestingBrush(int rgba) noexcept {}; TestingBrush(TestingColor color)62 explicit TestingBrush(TestingColor color) {} 63 SetAntiAlias(bool alias)64 virtual void SetAntiAlias(bool alias) {} SetWidth(float width)65 virtual void SetWidth(float width) {} SetColor(const TestingColor & color)66 virtual void SetColor(const TestingColor& color) {} SetColor(int color)67 virtual void SetColor(int color) {} SetShaderEffect(std::shared_ptr<TestingShaderEffect> effect)68 virtual void SetShaderEffect(std::shared_ptr<TestingShaderEffect> effect) {} SetFilter(const TestingFilter filter)69 virtual void SetFilter(const TestingFilter filter) {} SetBlendMode(BlendMode mode)70 virtual void SetBlendMode(BlendMode mode) {} SetAlpha(uint32_t alpha)71 virtual void SetAlpha(uint32_t alpha) {} SetAlphaF(float a)72 virtual void SetAlphaF(float a) {} SetARGB(int r,int g,int b,int a)73 virtual void SetARGB(int r, int g, int b, int a) {} 74 }; 75 } // namespace OHOS::Ace::Testing 76 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_BRUSH_H 77