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 BITMAP_TEST_H 17 #define BITMAP_TEST_H 18 19 #include "draw/brush.h" 20 #include "draw/canvas.h" 21 #include "draw/color.h" 22 #include "draw/pen.h" 23 #include "image/bitmap.h" 24 #include "utils/log.h" 25 26 #include "image_type.h" 27 #include "pixel_map.h" 28 29 namespace OHOS { 30 namespace Rosen { 31 namespace Drawing { 32 class BitmapTest { 33 public: 34 using TestFunc = std::function<void(Canvas&, uint32_t, uint32_t)>; GetInstance()35 inline static BitmapTest& GetInstance() 36 { 37 static BitmapTest bitmapTestCase; 38 return bitmapTestCase; 39 } 40 41 static void TestDrawBitmap(Canvas& canvas, uint32_t width, uint32_t height); 42 std::vector<TestFunc> BitmapTestCase(); 43 44 private: 45 BitmapTest() = default; 46 virtual ~BitmapTest() = default; 47 }; 48 } // namespace Drawing 49 } // namespace Rosen 50 } // namespace OHOS 51 #endif // BITMAP_TEST_H 52