1 /* 2 * Copyright (c) 2023 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_DRAW_CMD_LIST_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_DRAW_CMD_LIST_H 18 19 #include <cstdint> 20 21 #include "testing_canvas.h" 22 #include "testing_rect.h" 23 namespace OHOS::Ace::Testing { 24 class TestingDrawCmdList { 25 public: 26 TestingDrawCmdList() = default; 27 virtual ~TestingDrawCmdList() = default; 28 GetWidth()29 int32_t GetWidth() const 30 { 31 return width_; 32 } 33 GetHeight()34 int32_t GetHeight() const 35 { 36 return height_; 37 } 38 SetWidth(int32_t width)39 void SetWidth(int32_t width) 40 { 41 width_ = width; 42 } 43 SetHeight(int32_t height)44 void SetHeight(int32_t height) 45 { 46 height_ = height; 47 } 48 IsEmpty()49 bool IsEmpty() const 50 { 51 return false; 52 } 53 GetOpItemSize()54 size_t GetOpItemSize() const 55 { 56 return 0; 57 } 58 59 void Playback(TestingCanvas& canvas, const TestingRect* rect = nullptr) {} 60 61 private: 62 int32_t width_ = 0; 63 int32_t height_ = 0; 64 }; 65 } // namespace OHOS::Ace::Testing 66 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_DRAW_CMD_LIST_H 67