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_MATRIX_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_MATRIX_H
18 
19 #include <stdint.h>
20 #include <vector>
21 
22 #include "testing_point.h"
23 
24 namespace OHOS::Ace::Testing {
25 class TestingMatrix {
26 public:
27     enum Index {
28         SCALE_X,
29         SKEW_X,
30         TRANS_X,
31         SKEW_Y,
32         SCALE_Y,
33         TRANS_Y,
34         PERSP_0,
35         PERSP_1,
36         PERSP_2,
37     };
38 
39     TestingMatrix() = default;
40     ~TestingMatrix() = default;
PreRotate(float degree,float px,float py)41     void PreRotate(float degree, float px, float py) {}
PreConcat(const TestingMatrix & other)42     void PreConcat(const TestingMatrix& other) {}
PreTranslate(float dx,float dy)43     void PreTranslate(float dx, float dy) {}
SetScale(float sx,float sy)44     void SetScale(float sx, float sy) {}
Rotate(float degree,float px,float py)45     void Rotate(float degree, float px, float py) {}
Translate(float dx,float dy)46     void Translate(float dx, float dy) {}
Scale(float sx,float sy,float px,float py)47     void Scale(float sx, float sy, float px, float py) {}
48 
49     TestingMatrix operator*(const TestingMatrix& other)
50     {
51         return other;
52     }
53 
54     bool operator==(const TestingMatrix& /* other */)
55     {
56         return false;
57     }
58 
SetMatrix(float scaleX,float skewX,float transX,float skewY,float scaleY,float transY,float p0,float p1,float p2)59     void SetMatrix(
60         float scaleX, float skewX, float transX, float skewY, float scaleY, float transY, float p0, float p1, float p2)
61     {}
62 
Set(Index index,float value)63     void Set(Index index, float value) {}
64 
MapPoints(std::vector<TestingPoint> & dst,const std::vector<TestingPoint> & src,uint32_t count)65     void MapPoints(std::vector<TestingPoint>& dst, const std::vector<TestingPoint>& src, uint32_t count) const {}
66 
Get(int)67     float Get(int /* index */) const
68     {
69         return 1.0f;
70     }
71 
Reset()72     void Reset() {}
73 };
74 } // namespace OHOS::Ace::Testing
75 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_MOCK_ROSEN_TEST_TESTING_MATRIX_H
76