idlize

Форк
0
/
units.d.ts 
75 строк · 1.7 Кб
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

17
declare type Resource = import('../resource/resource').Resource;
18

19
declare type LengthMetricsUnit = import('../api/arkui/Graphics').LengthMetricsUnit;
20

21
declare type LengthMetrics = import('../api/arkui/Graphics').LengthMetrics;
22

23
declare type Length = string | number | Resource;
24

25
declare type ResourceColor = Color | number | string | Resource;
26

27
declare type PX = `${number}px`;
28

29
declare type VP = `${number}vp` | number;
30

31
declare type FP = `${number}fp`;
32

33
declare type LPX = `${number}lpx`;
34

35
declare type Percentage = `${number}%`;
36

37
declare type Dimension = PX | VP | FP | LPX | Percentage | Resource;
38

39
declare type ResourceStr = string | Resource;
40

41
declare type Offset = {
42
    dx: Length;
43

44
    dy: Length;
45
};
46

47
declare type AltOffset = {
48
    dx1: Length;
49
    dy2: Length;
50
};
51

52
declare interface Position {
53

54
    x?: Length;
55

56
    y?: Length;
57
}
58

59
declare interface LocalizedPadding {
60

61
  top?: LengthMetrics;
62

63
  end?: LengthMetrics;
64

65
  bottom?: LengthMetrics;
66

67
  start?: LengthMetrics;
68
};
69

70
declare interface Font {
71
  size?: Length;
72
  weight?: FontWeight | number | string;
73
  family?: string | Resource;
74
  style?: FontStyle;
75
}
76

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.