• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-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/**
17 * Provides an interface for drawing rectangles.
18 * @since 7
19 */
20/**
21 * Provides an interface for drawing rectangles.
22 * @form
23 * @since 9
24 */
25interface RectInterface {
26  /**
27   * Use new function to create Rect.
28   * @since 7
29   */
30  /**
31   * Use new function to create Rect.
32   * @form
33   * @since 9
34   */
35  new (
36    value?:
37      {
38        width?: number | string;
39        height?: number | string;
40        radius?: number | string | Array<any>;
41      }
42      | {
43          width?: number | string;
44          height?: number | string;
45          radiusWidth?: number | string;
46          radiusHeight?: number | string;
47        },
48  ): RectAttribute;
49
50  /**
51   * Called when a rectangle is created.
52   * @since 7
53   */
54  /**
55   * Called when a rectangle is created.
56   * @form
57   * @since 9
58   */
59  (
60    value?:
61      {
62        width?: number | string;
63        height?: number | string;
64        radius?: number | string | Array<any>;
65      }
66      | {
67          width?: number | string;
68          height?: number | string;
69          radiusWidth?: number | string;
70          radiusHeight?: number | string;
71        },
72  ): RectAttribute;
73}
74
75/**
76 * @since 7
77 */
78/**
79 * @form
80 * @since 9
81 */
82declare class RectAttribute extends CommonShapeMethod<RectAttribute> {
83  /**
84   * Called when the fillet width is set.
85   * @since 7
86   */
87  /**
88   * Called when the fillet width is set.
89   * @form
90   * @since 9
91   */
92  radiusWidth(value: number | string): RectAttribute;
93
94  /**
95   * Called when the fillet height is set.
96   * @since 7
97   */
98  /**
99   * Called when the fillet height is set.
100   * @form
101   * @since 9
102   */
103  radiusHeight(value: number | string): RectAttribute;
104
105  /**
106   * Called when the fillet size is set.
107   * @since 7
108   */
109  /**
110   * Called when the fillet size is set.
111   * @form
112   * @since 9
113   */
114  radius(value: number | string | Array<any>): RectAttribute;
115}
116
117/**
118 * @form
119 * @since 9
120 */
121declare const Rect: RectInterface;
122
123/**
124 * @deprecated since 9
125 */
126declare const RectInStance: RectAttribute;
127
128/**
129 * @form
130 * @since 9
131 */
132declare const RectInstance: RectAttribute;
133