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 CONVEX_PATHS_H 16 #define CONVEX_PATHS_H 17 #include <bits/alltypes.h> 18 #include <native_drawing/drawing_canvas.h> 19 #include <native_drawing/drawing_filter.h> 20 #include <native_drawing/drawing_mask_filter.h> 21 #include <native_drawing/drawing_rect.h> 22 23 #include "test_base.h" 24 #include "test_common.h" 25 26 #include "common/log_common.h" 27 28 class ConvexPaths final : public TestBase { 29 public: ConvexPaths()30 ConvexPaths() 31 { 32 bitmapWidth_ = 1200; // 1200宽度 33 bitmapHeight_ = 1100; // 1100高度 34 fileName_ = "convexpaths"; 35 } 36 ~ConvexPaths() override; 37 void MakePath(); 38 39 protected: 40 void OnTestFunction(OH_Drawing_Canvas *canvas) override; 41 void MakePath1(); 42 void MakePath2(); 43 void MakePath3(); 44 void MakePath4(); 45 void MakePath5(); 46 void MakePath6(); 47 }; 48 49 #endif // CONVEX_PATHS_H 50