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 CONIC_PATHS_H 16 #define CONIC_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 ConicPaths final : public TestBase { 29 public: ConicPaths()30 ConicPaths() 31 { 32 bitmapWidth_ = 920; // 920宽度 33 bitmapHeight_ = 960; // 960高度 34 fileName_ = "conicpaths"; 35 } 36 ~ConicPaths() override; 37 void Makepath(); 38 39 protected: 40 void OnTestFunction(OH_Drawing_Canvas *canvas) override; 41 std::vector<OH_Drawing_Path *> fPaths; 42 // const float w = sqrt(2.0f) / 2; // 2被除数 43 void Makepath1(); 44 void Makepath2(); 45 void DrawSence(OH_Drawing_Canvas *canvas, OH_Drawing_Pen *pen, OH_Drawing_Brush *brush, uint8_t a, int p); 46 }; 47 48 #endif // MyApplication_conic_paths_H 49