• 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 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Provides an interface for drawing rectangles.
23 *
24 * @interface RectInterface
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 */
28/**
29 * Provides an interface for drawing rectangles.
30 *
31 * @interface RectInterface
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @form
34 * @since 9
35 */
36/**
37 * Provides an interface for drawing rectangles.
38 *
39 * @interface RectInterface
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @form
43 * @since 10
44 */
45/**
46 * Provides an interface for drawing rectangles.
47 *
48 * @interface RectInterface
49 * @syscap SystemCapability.ArkUI.ArkUI.Full
50 * @crossplatform
51 * @form
52 * @atomicservice
53 * @since 11
54 */
55interface RectInterface {
56  /**
57   * Use new function to create Rect.
58   *
59   * @param { object } value
60   * @returns { RectAttribute }
61   * @syscap SystemCapability.ArkUI.ArkUI.Full
62   * @since 7
63   */
64  /**
65   * Use new function to create Rect.
66   *
67   * @param { object } value
68   * @returns { RectAttribute }
69   * @syscap SystemCapability.ArkUI.ArkUI.Full
70   * @form
71   * @since 9
72   */
73  /**
74   * Use new function to create Rect.
75   *
76   * @param { object } value
77   * @returns { RectAttribute }
78   * @syscap SystemCapability.ArkUI.ArkUI.Full
79   * @crossplatform
80   * @form
81   * @since 10
82   */
83  /**
84   * Use new function to create Rect.
85   *
86   * @param { object } value
87   * @returns { RectAttribute }
88   * @syscap SystemCapability.ArkUI.ArkUI.Full
89   * @crossplatform
90   * @form
91   * @atomicservice
92   * @since 11
93   */
94  new (
95    value?:
96      {
97        width?: number | string;
98        height?: number | string;
99        radius?: number | string | Array<any>;
100      }
101      | {
102        width?: number | string;
103        height?: number | string;
104        radiusWidth?: number | string;
105        radiusHeight?: number | string;
106      },
107  ): RectAttribute;
108
109  /**
110   * Called when a rectangle is created.
111   *
112   * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} |
113  *  {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value
114   * @returns { RectAttribute }
115   * @syscap SystemCapability.ArkUI.ArkUI.Full
116   * @since 7
117   */
118  /**
119   * Called when a rectangle is created.
120   *
121   * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} |
122  *  {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value
123   * @returns { RectAttribute }
124   * @syscap SystemCapability.ArkUI.ArkUI.Full
125   * @form
126   * @since 9
127   */
128  /**
129   * Called when a rectangle is created.
130   *
131   * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} |
132   *  {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value
133   * @returns { RectAttribute }
134   * @syscap SystemCapability.ArkUI.ArkUI.Full
135   * @crossplatform
136   * @form
137   * @since 10
138   */
139  /**
140   * Called when a rectangle is created.
141   *
142   * @param { {width?: number | string;height?: number | string;radius?: number | string | Array<any>;} |
143   *  {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value
144   * @returns { RectAttribute }
145   * @syscap SystemCapability.ArkUI.ArkUI.Full
146   * @crossplatform
147   * @form
148   * @atomicservice
149   * @since 11
150   */
151  (
152    value?:
153      {
154        width?: number | string;
155        height?: number | string;
156        radius?: number | string | Array<any>;
157      }
158      | {
159        width?: number | string;
160        height?: number | string;
161        radiusWidth?: number | string;
162        radiusHeight?: number | string;
163      },
164  ): RectAttribute;
165}
166
167/**
168 * rect attribute declaration.
169 *
170 * @extends CommonShapeMethod<RectAttribute>
171 * @syscap SystemCapability.ArkUI.ArkUI.Full
172 * @since 7
173 */
174/**
175 * rect attribute declaration.
176 *
177 * @extends CommonShapeMethod<RectAttribute>
178 * @syscap SystemCapability.ArkUI.ArkUI.Full
179 * @form
180 * @since 9
181 */
182/**
183 * rect attribute declaration.
184 *
185 * @extends CommonShapeMethod<RectAttribute>
186 * @syscap SystemCapability.ArkUI.ArkUI.Full
187 * @crossplatform
188 * @form
189 * @since 10
190 */
191/**
192 * rect attribute declaration.
193 *
194 * @extends CommonShapeMethod<RectAttribute>
195 * @syscap SystemCapability.ArkUI.ArkUI.Full
196 * @crossplatform
197 * @form
198 * @atomicservice
199 * @since 11
200 */
201declare class RectAttribute extends CommonShapeMethod<RectAttribute> {
202  /**
203   * Called when the fillet width is set.
204   *
205   * @param { number | string } value
206   * @returns { RectAttribute }
207   * @syscap SystemCapability.ArkUI.ArkUI.Full
208   * @since 7
209   */
210  /**
211   * Called when the fillet width is set.
212   *
213   * @param { number | string } value
214   * @returns { RectAttribute }
215   * @syscap SystemCapability.ArkUI.ArkUI.Full
216   * @form
217   * @since 9
218   */
219  /**
220   * Called when the fillet width is set.
221   *
222   * @param { number | string } value
223   * @returns { RectAttribute }
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @crossplatform
226   * @form
227   * @since 10
228   */
229  /**
230   * Called when the fillet width is set.
231   *
232   * @param { number | string } value
233   * @returns { RectAttribute }
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @crossplatform
236   * @form
237   * @atomicservice
238   * @since 11
239   */
240  radiusWidth(value: number | string): RectAttribute;
241
242  /**
243   * Called when the fillet height is set.
244   *
245   * @param { number | string } value
246   * @returns { RectAttribute }
247   * @syscap SystemCapability.ArkUI.ArkUI.Full
248   * @since 7
249   */
250  /**
251   * Called when the fillet height is set.
252   *
253   * @param { number | string } value
254   * @returns { RectAttribute }
255   * @syscap SystemCapability.ArkUI.ArkUI.Full
256   * @form
257   * @since 9
258   */
259  /**
260   * Called when the fillet height is set.
261   *
262   * @param { number | string } value
263   * @returns { RectAttribute }
264   * @syscap SystemCapability.ArkUI.ArkUI.Full
265   * @crossplatform
266   * @form
267   * @since 10
268   */
269  /**
270   * Called when the fillet height is set.
271   *
272   * @param { number | string } value
273   * @returns { RectAttribute }
274   * @syscap SystemCapability.ArkUI.ArkUI.Full
275   * @crossplatform
276   * @form
277   * @atomicservice
278   * @since 11
279   */
280  radiusHeight(value: number | string): RectAttribute;
281
282  /**
283   * Called when the fillet size is set.
284   *
285   * @param { number | string | Array<any> } value
286   * @returns { RectAttribute }
287   * @syscap SystemCapability.ArkUI.ArkUI.Full
288   * @since 7
289   */
290  /**
291   * Called when the fillet size is set.
292   *
293   * @param { number | string | Array<any> } value
294   * @returns { RectAttribute }
295   * @syscap SystemCapability.ArkUI.ArkUI.Full
296   * @form
297   * @since 9
298   */
299  /**
300   * Called when the fillet size is set.
301   *
302   * @param { number | string | Array<any> } value
303   * @returns { RectAttribute }
304   * @syscap SystemCapability.ArkUI.ArkUI.Full
305   * @crossplatform
306   * @form
307   * @since 10
308   */
309  /**
310   * Called when the fillet size is set.
311   *
312   * @param { number | string | Array<any> } value
313   * @returns { RectAttribute }
314   * @syscap SystemCapability.ArkUI.ArkUI.Full
315   * @crossplatform
316   * @form
317   * @atomicservice
318   * @since 11
319   */
320  radius(value: number | string | Array<any>): RectAttribute;
321}
322
323/**
324 * Defines Rect Component.
325 *
326 * @syscap SystemCapability.ArkUI.ArkUI.Full
327 * @form
328 * @since 9
329 */
330/**
331 * Defines Rect Component.
332 *
333 * @syscap SystemCapability.ArkUI.ArkUI.Full
334 * @crossplatform
335 * @form
336 * @since 10
337 */
338/**
339 * Defines Rect Component.
340 *
341 * @syscap SystemCapability.ArkUI.ArkUI.Full
342 * @crossplatform
343 * @form
344 * @atomicservice
345 * @since 11
346 */
347declare const Rect: RectInterface;
348
349/**
350 * Rect attribute.
351 *
352 * @syscap SystemCapability.ArkUI.ArkUI.Full
353 * @since 7
354 * @deprecated since 9
355 */
356declare const RectInStance: RectAttribute;
357
358/**
359 * Rect attribute.
360 *
361 * @syscap SystemCapability.ArkUI.ArkUI.Full
362 * @form
363 * @since 9
364 */
365/**
366 * @syscap SystemCapability.ArkUI.ArkUI.Full
367 * @crossplatform
368 * @form
369 * @since 10
370 */
371/**
372 * @syscap SystemCapability.ArkUI.ArkUI.Full
373 * @crossplatform
374 * @form
375 * @atomicservice
376 * @since 11
377 */
378declare const RectInstance: RectAttribute;
379