idlize
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
16
17declare type Resource = import('../resource/resource').Resource;18
19declare type LengthMetricsUnit = import('../api/arkui/Graphics').LengthMetricsUnit;20
21declare type LengthMetrics = import('../api/arkui/Graphics').LengthMetrics;22
23declare type Length = string | number | Resource;24
25declare type ResourceColor = Color | number | string | Resource;26
27declare type PX = `${number}px`;28
29declare type VP = `${number}vp` | number;30
31declare type FP = `${number}fp`;32
33declare type LPX = `${number}lpx`;34
35declare type Percentage = `${number}%`;36
37declare type Dimension = PX | VP | FP | LPX | Percentage | Resource;38
39declare type ResourceStr = string | Resource;40
41declare type Offset = {42dx: Length;43
44dy: Length;45};46
47declare type AltOffset = {48dx1: Length;49dy2: Length;50};51
52declare interface Position {53
54x?: Length;55
56y?: Length;57}
58
59declare interface LocalizedPadding {60
61top?: LengthMetrics;62
63end?: LengthMetrics;64
65bottom?: LengthMetrics;66
67start?: LengthMetrics;68};69
70declare interface Font {71size?: Length;72weight?: FontWeight | number | string;73family?: string | Resource;74style?: FontStyle;75}
76