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_BRIDGE_COMMON_UTILS_COMPONENTINFO_H 17 #define FOUNDATION_ACE_FRAMEWORKS_BRIDGE_COMMON_UTILS_COMPONENTINFO_H 18 19 #include "base/geometry/matrix4.h" 20 #include "base/geometry/ng/offset_t.h" 21 #include "base/geometry/ng/size_t.h" 22 #include "base/geometry/rect.h" 23 24 namespace OHOS::Ace::NG { 25 struct TranslateOption { 26 double x = 0.0; 27 double y = 0.0; 28 double z = 0.0; 29 }; 30 struct ScaleOption { 31 double x = 0.0; 32 double y = 0.0; 33 double z = 0.0; 34 double centerX = 0.0; 35 double centerY = 0.0; 36 }; 37 struct RotateOption { 38 double x = 0.0; 39 double y = 0.0; 40 double z = 0.0; 41 double angle = 0.0; 42 double centerX = 0.0; 43 double centerY = 0.0; 44 }; 45 struct Rectangle { 46 SizeF size; 47 OffsetF localOffset; 48 OffsetF windowOffset; 49 Rect screenRect; 50 TranslateOption translate; 51 ScaleOption scale; 52 RotateOption rotate; 53 Matrix4 matrix4; 54 }; 55 } // namespace OHOS::Ace::NG 56 #endif // FOUNDATION_ACE_FRAMEWORKS_BRIDGE_COMMON_UTILS_COMPONENTINFO_H 57