• 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 *
19 * @interface RectInterface
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 7
22 */
23/**
24 * Provides an interface for drawing rectangles.
25 *
26 * @interface RectInterface
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @since 9
29 * @form
30 */
31/**
32 * Provides an interface for drawing rectangles.
33 *
34 * @interface RectInterface
35 * @syscap SystemCapability.ArkUI.ArkUI.Full
36 * @crossplatform
37 * @since 10
38 * @form
39 */
40interface RectInterface {
41  /**
42   * Use new function to create Rect.
43   *
44   * @param { object } value
45   * @returns { RectAttribute }
46   * @syscap SystemCapability.ArkUI.ArkUI.Full
47   * @since 7
48   */
49  /**
50   * Use new function to create Rect.
51   *
52   * @param { object } value
53   * @returns { RectAttribute }
54   * @syscap SystemCapability.ArkUI.ArkUI.Full
55   * @since 9
56   * @form
57   */
58  /**
59   * Use new function to create Rect.
60   *
61   * @param { object } value
62   * @returns { RectAttribute }
63   * @syscap SystemCapability.ArkUI.ArkUI.Full
64   * @crossplatform
65   * @since 10
66   * @form
67   */
68  new (
69    value?:
70      {
71        width?: number | string;
72        height?: number | string;
73        radius?: number | string | Array<any>;
74      }
75      | {
76        width?: number | string;
77        height?: number | string;
78        radiusWidth?: number | string;
79        radiusHeight?: number | string;
80      },
81  ): RectAttribute;
82
83  /**
84   * Called when a rectangle is created.
85   *
86   * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} |
87  *  {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value
88   * @returns { RectAttribute }
89   * @syscap SystemCapability.ArkUI.ArkUI.Full
90   * @since 7
91   */
92  /**
93   * Called when a rectangle is created.
94   *
95   * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} |
96  *  {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value
97   * @returns { RectAttribute }
98   * @syscap SystemCapability.ArkUI.ArkUI.Full
99   * @since 9
100   * @form
101   */
102  /**
103   * Called when a rectangle is created.
104   *
105   * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} |
106   *  {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value
107   * @returns { RectAttribute }
108   * @syscap SystemCapability.ArkUI.ArkUI.Full
109   * @crossplatform
110   * @since 10
111   * @form
112   */
113  (
114    value?:
115      {
116        width?: number | string;
117        height?: number | string;
118        radius?: number | string | Array<any>;
119      }
120      | {
121        width?: number | string;
122        height?: number | string;
123        radiusWidth?: number | string;
124        radiusHeight?: number | string;
125      },
126  ): RectAttribute;
127}
128
129/**
130 * rect attribute declaration.
131 *
132 * @extends CommonShapeMethod
133 * @since 7
134 */
135/**
136 * rect attribute declaration.
137 *
138 * @extends CommonShapeMethod
139 * @since 9
140 * @form
141 */
142/**
143 * rect attribute declaration.
144 *
145 * @extends CommonShapeMethod
146 * @crossplatform
147 * @since 10
148 * @form
149 */
150declare class RectAttribute extends CommonShapeMethod<RectAttribute> {
151  /**
152   * Called when the fillet width is set.
153   *
154   * @param { number | string } value
155   * @returns { RectAttribute }
156   * @syscap SystemCapability.ArkUI.ArkUI.Full
157   * @since 7
158   */
159  /**
160   * Called when the fillet width is set.
161   *
162   * @param { number | string } value
163   * @returns { RectAttribute }
164   * @syscap SystemCapability.ArkUI.ArkUI.Full
165   * @since 9
166   * @form
167   */
168  /**
169   * Called when the fillet width is set.
170   *
171   * @param { number | string } value
172   * @returns { RectAttribute }
173   * @syscap SystemCapability.ArkUI.ArkUI.Full
174   * @crossplatform
175   * @since 10
176   * @form
177   */
178  radiusWidth(value: number | string): RectAttribute;
179
180  /**
181   * Called when the fillet height is set.
182   *
183   * @param { number | string } value
184   * @returns { RectAttribute }
185   * @syscap SystemCapability.ArkUI.ArkUI.Full
186   * @since 7
187   */
188  /**
189   * Called when the fillet height is set.
190   *
191   * @param { number | string } value
192   * @returns { RectAttribute }
193   * @syscap SystemCapability.ArkUI.ArkUI.Full
194   * @since 9
195   * @form
196   */
197  /**
198   * Called when the fillet height is set.
199   *
200   * @param { number | string } value
201   * @returns { RectAttribute }
202   * @syscap SystemCapability.ArkUI.ArkUI.Full
203   * @crossplatform
204   * @since 10
205   * @form
206   */
207  radiusHeight(value: number | string): RectAttribute;
208
209  /**
210   * Called when the fillet size is set.
211   *
212   * @param { number | string | Array<any> } value
213   * @returns { RectAttribute }
214   * @syscap SystemCapability.ArkUI.ArkUI.Full
215   * @since 7
216   */
217  /**
218   * Called when the fillet size is set.
219   *
220   * @param { number | string | Array<any> } value
221   * @returns { RectAttribute }
222   * @syscap SystemCapability.ArkUI.ArkUI.Full
223   * @since 9
224   * @form
225   */
226  /**
227   * Called when the fillet size is set.
228   *
229   * @param { number | string | Array<any> } value
230   * @returns { RectAttribute }
231   * @syscap SystemCapability.ArkUI.ArkUI.Full
232   * @crossplatform
233   * @since 10
234   * @form
235   */
236  radius(value: number | string | Array<any>): RectAttribute;
237}
238
239/**
240 * Defines Rect Component.
241 *
242 * @syscap SystemCapability.ArkUI.ArkUI.Full
243 * @since 9
244 * @form
245 */
246/**
247 * Defines Rect Component.
248 *
249 * @syscap SystemCapability.ArkUI.ArkUI.Full
250 * @crossplatform
251 * @since 10
252 * @form
253 */
254declare const Rect: RectInterface;
255
256/**
257 * Rect attribute.
258 *
259 * @syscap SystemCapability.ArkUI.ArkUI.Full
260 * @since 7
261 * @deprecated since 9
262 */
263declare const RectInStance: RectAttribute;
264
265/**
266 * Rect attribute.
267 *
268 * @syscap SystemCapability.ArkUI.ArkUI.Full
269 * @since 9
270 * @form
271 */
272/**
273 * @syscap SystemCapability.ArkUI.ArkUI.Full
274 * @crossplatform
275 * @since 10
276 * @form
277 */
278declare const RectInstance: RectAttribute;
279