• 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/*** if arkts 1.2 */
22import { CommonShapeMethod } from './common';
23/*** endif */
24
25/**
26 * Define options used to construct a path.
27 *
28 * @interface PathOptions
29 * @syscap SystemCapability.ArkUI.ArkUI.Full
30 * @crossplatform
31 * @form
32 * @atomicservice
33 * @since arkts {'1.1':'18','1.2':'20'}
34 * @arkts 1.1&1.2
35 */
36declare interface PathOptions {
37  /**
38   * Width option.
39   * @type { ?(number | string) }
40   * @syscap SystemCapability.ArkUI.ArkUI.Full
41   * @since 7
42   */
43  /**
44   * Width option.
45   * @type { ?(number | string) }
46   * @syscap SystemCapability.ArkUI.ArkUI.Full
47   * @form
48   * @since 9
49   */
50  /**
51   * Width option.
52   * @type { ?(number | string) }
53   * @syscap SystemCapability.ArkUI.ArkUI.Full
54   * @crossplatform
55   * @form
56   * @since 10
57   */
58  /**
59   * Width option.
60   * @type { ?(number | string) }
61   * @syscap SystemCapability.ArkUI.ArkUI.Full
62   * @crossplatform
63   * @form
64   * @atomicservice
65   * @since 11
66   */
67  /**
68   * Width option.
69   * Anonymous Object Rectification.
70   *
71   * @type { ?(number | string) }
72   * @syscap SystemCapability.ArkUI.ArkUI.Full
73   * @crossplatform
74   * @form
75   * @atomicservice
76   * @since 18
77   */
78  /**
79   * Width option.
80   * @type { ?Length }
81   * @syscap SystemCapability.ArkUI.ArkUI.Full
82   * @crossplatform
83   * @form
84   * @atomicservice
85   * @since 20
86   */
87  width?: Length;
88  /**
89   * Width option.
90   * @type { ?(number | string) }
91   * @syscap SystemCapability.ArkUI.ArkUI.Full
92   * @crossplatform
93   * @form
94   * @atomicservice
95   * @since 20
96   * @arkts 1.2
97   */
98  width?: number | string;
99
100  /**
101   * Height option.
102   * @type { ?(number | string) }
103   * @syscap SystemCapability.ArkUI.ArkUI.Full
104   * @since 7
105   */
106  /**
107   * Height option.
108   * @type { ?(number | string) }
109   * @syscap SystemCapability.ArkUI.ArkUI.Full
110   * @form
111   * @since 9
112   */
113  /**
114   * Height option.
115   * @type { ?(number | string) }
116   * @syscap SystemCapability.ArkUI.ArkUI.Full
117   * @crossplatform
118   * @form
119   * @since 10
120   */
121  /**
122   * Height option.
123   * @type { ?(number | string) }
124   * @syscap SystemCapability.ArkUI.ArkUI.Full
125   * @crossplatform
126   * @form
127   * @atomicservice
128   * @since 11
129   */
130  /**
131   * Height option.
132   * Anonymous Object Rectification.
133   *
134   * @type { ?(number | string) }
135   * @syscap SystemCapability.ArkUI.ArkUI.Full
136   * @crossplatform
137   * @form
138   * @atomicservice
139   * @since 18
140   */
141  /**
142   * Height option.
143   * @type { ?Length }
144   * @syscap SystemCapability.ArkUI.ArkUI.Full
145   * @crossplatform
146   * @form
147   * @atomicservice
148   * @since 20
149   */
150  height?: Length;
151  /**
152   * Height option.
153   * @type { ?(number | string) }
154   * @syscap SystemCapability.ArkUI.ArkUI.Full
155   * @crossplatform
156   * @form
157   * @atomicservice
158   * @since 20
159   * @arkts 1.2
160   */
161  height?: number | string;
162
163  /**
164   * Commands option.
165   * @type { ?string }
166   * @syscap SystemCapability.ArkUI.ArkUI.Full
167   * @since 7
168   */
169  /**
170   * Commands option.
171   * @type { ?string }
172   * @syscap SystemCapability.ArkUI.ArkUI.Full
173   * @form
174   * @since 9
175   */
176  /**
177   * Commands option.
178   * @type { ?string }
179   * @syscap SystemCapability.ArkUI.ArkUI.Full
180   * @crossplatform
181   * @form
182   * @since 10
183   */
184  /**
185   * Commands option.
186   * @type { ?string }
187   * @syscap SystemCapability.ArkUI.ArkUI.Full
188   * @crossplatform
189   * @form
190   * @atomicservice
191   * @since 11
192   */
193  /**
194   * Commands option.
195   * Anonymous Object Rectification.
196   *
197   * @type { ?string }
198   * @syscap SystemCapability.ArkUI.ArkUI.Full
199   * @crossplatform
200   * @form
201   * @atomicservice
202   * @since 18
203   */
204  /**
205   * Commands option.
206   * @type { ?ResourceStr }
207   * @syscap SystemCapability.ArkUI.ArkUI.Full
208   * @crossplatform
209   * @form
210   * @atomicservice
211   * @since 20
212   */
213  commands?: ResourceStr;
214  /**
215   * Commands option.
216   * @type { ?string }
217   * @syscap SystemCapability.ArkUI.ArkUI.Full
218   * @crossplatform
219   * @form
220   * @atomicservice
221   * @since 20
222   * @arkts 1.2
223   */
224  commands?: string
225}
226
227/**
228 * Provides the path drawing interface.
229 *
230 * @interface PathInterface
231 * @syscap SystemCapability.ArkUI.ArkUI.Full
232 * @since 7
233 */
234/**
235 * Provides the path drawing interface.
236 *
237 * @interface PathInterface
238 * @syscap SystemCapability.ArkUI.ArkUI.Full
239 * @form
240 * @since 9
241 */
242/**
243 * Provides the path drawing interface.
244 *
245 * @interface PathInterface
246 * @syscap SystemCapability.ArkUI.ArkUI.Full
247 * @crossplatform
248 * @form
249 * @since 10
250 */
251/**
252 * Provides the path drawing interface.
253 *
254 * @interface PathInterface
255 * @syscap SystemCapability.ArkUI.ArkUI.Full
256 * @crossplatform
257 * @form
258 * @atomicservice
259 * @since 11
260 */
261interface PathInterface {
262  /**
263   * Use new to create Path.
264   *
265   * @param { object } value
266   * @returns { PathAttribute }
267   * @syscap SystemCapability.ArkUI.ArkUI.Full
268   * @since 7
269   */
270  /**
271   * Use new to create Path.
272   *
273   * @param { object } value
274   * @returns { PathAttribute }
275   * @syscap SystemCapability.ArkUI.ArkUI.Full
276   * @form
277   * @since 9
278   */
279  /**
280   * Use new to create Path.
281   *
282   * @param { object } value
283   * @returns { PathAttribute }
284   * @syscap SystemCapability.ArkUI.ArkUI.Full
285   * @crossplatform
286   * @form
287   * @since 10
288   */
289  /**
290   * Use new to create Path.
291   *
292   * @param { object } value
293   * @returns { PathAttribute }
294   * @syscap SystemCapability.ArkUI.ArkUI.Full
295   * @crossplatform
296   * @form
297   * @atomicservice
298   * @since 11
299   */
300  /**
301   * Use new to create Path.
302   * Annonymous Object Rectification.
303   *
304   * @param { PathOptions } [options] - path options
305   * @returns { PathAttribute }
306   * @syscap SystemCapability.ArkUI.ArkUI.Full
307   * @crossplatform
308   * @form
309   * @atomicservice
310   * @since 18
311   */
312  new (options?: PathOptions): PathAttribute;
313
314  /**
315   * Called when drawing path.
316   *
317   * @param { object } value
318   * @returns { PathAttribute }
319   * @syscap SystemCapability.ArkUI.ArkUI.Full
320   * @since 7
321   */
322  /**
323   * Called when drawing path.
324   *
325   * @param { object } value
326   * @returns { PathAttribute }
327   * @syscap SystemCapability.ArkUI.ArkUI.Full
328   * @form
329   * @since 9
330   */
331  /**
332   * Called when drawing path.
333   *
334   * @param { object } value
335   * @returns { PathAttribute }
336   * @syscap SystemCapability.ArkUI.ArkUI.Full
337   * @crossplatform
338   * @form
339   * @since 10
340   */
341  /**
342   * Called when drawing path.
343   *
344   * @param { object } value
345   * @returns { PathAttribute }
346   * @syscap SystemCapability.ArkUI.ArkUI.Full
347   * @crossplatform
348   * @form
349   * @atomicservice
350   * @since 11
351   */
352  /**
353   * Called when drawing path.
354   * Anonymous Object Rectification.
355   *
356   * @param { PathOptions } [options] - path options
357   * @returns { PathAttribute }
358   * @syscap SystemCapability.ArkUI.ArkUI.Full
359   * @crossplatform
360   * @form
361   * @atomicservice
362   * @since 18
363   */
364  (options?: PathOptions): PathAttribute;
365}
366
367/**
368 * Provides methods for attribute path component.
369 *
370 * @extends CommonShapeMethod<PathAttribute>
371 * @syscap SystemCapability.ArkUI.ArkUI.Full
372 * @since 7
373 */
374/**
375 * Provides methods for attribute path component.
376 *
377 * @extends CommonShapeMethod<PathAttribute>
378 * @syscap SystemCapability.ArkUI.ArkUI.Full
379 * @form
380 * @since 9
381 */
382/**
383 * Provides methods for attribute path component.
384 *
385 * @extends CommonShapeMethod<PathAttribute>
386 * @syscap SystemCapability.ArkUI.ArkUI.Full
387 * @crossplatform
388 * @form
389 * @since 10
390 */
391/**
392 * Provides methods for attribute path component.
393 *
394 * @extends CommonShapeMethod<PathAttribute>
395 * @syscap SystemCapability.ArkUI.ArkUI.Full
396 * @crossplatform
397 * @form
398 * @atomicservice
399 * @since arkts {'1.1':'11','1.2':'20'}
400 * @arkts 1.1&1.2
401 */
402declare class PathAttribute extends CommonShapeMethod<PathAttribute> {
403  /**
404   * Called when the command string drawn by the path is set.
405   *
406   * @param { string } value
407   * @returns { PathAttribute }
408   * @syscap SystemCapability.ArkUI.ArkUI.Full
409   * @since 7
410   */
411  /**
412   * Called when the command string drawn by the path is set.
413   *
414   * @param { string } value
415   * @returns { PathAttribute }
416   * @syscap SystemCapability.ArkUI.ArkUI.Full
417   * @form
418   * @since 9
419   */
420  /**
421   * Called when the command string drawn by the path is set.
422   *
423   * @param { string } value
424   * @returns { PathAttribute }
425   * @syscap SystemCapability.ArkUI.ArkUI.Full
426   * @crossplatform
427   * @form
428   * @since 10
429   */
430  /**
431   * Called when the command string drawn by the path is set.
432   *
433   * @param { string } value
434   * @returns { PathAttribute }
435   * @syscap SystemCapability.ArkUI.ArkUI.Full
436   * @crossplatform
437   * @form
438   * @atomicservice
439   * @since 11
440   */
441  /**
442   * Called when the command string drawn by the path is set.
443   *
444   * @param { ResourceStr } value
445   * @returns { PathAttribute }
446   * @syscap SystemCapability.ArkUI.ArkUI.Full
447   * @crossplatform
448   * @form
449   * @atomicservice
450   * @since 20
451   */
452  commands(value: ResourceStr): PathAttribute;
453  /**
454   * Called when the command string drawn by the path is set.
455   *
456   * @param { string } value
457   * @returns { PathAttribute }
458   * @syscap SystemCapability.ArkUI.ArkUI.Full
459   * @crossplatform
460   * @form
461   * @atomicservice
462   * @since 20
463   * @arkts 1.2
464   */
465  commands(value: string): PathAttribute;
466}
467
468/**
469 * Defines Path Component.
470 *
471 * @syscap SystemCapability.ArkUI.ArkUI.Full
472 * @since 7
473 */
474/**
475 * Defines Path Component.
476 *
477 * @syscap SystemCapability.ArkUI.ArkUI.Full
478 * @form
479 * @since 9
480 */
481/**
482 * Defines Path Component.
483 *
484 * @syscap SystemCapability.ArkUI.ArkUI.Full
485 * @crossplatform
486 * @form
487 * @since 10
488 */
489/**
490 * Defines Path Component.
491 *
492 * @syscap SystemCapability.ArkUI.ArkUI.Full
493 * @crossplatform
494 * @form
495 * @atomicservice
496 * @since 11
497 */
498declare const Path: PathInterface;
499
500/**
501 * Defines Path Component instance.
502 *
503 * @syscap SystemCapability.ArkUI.ArkUI.Full
504 * @since 7
505 */
506/**
507 * Defines Path Component instance.
508 *
509 * @syscap SystemCapability.ArkUI.ArkUI.Full
510 * @form
511 * @since 9
512 */
513/**
514 * Defines Path Component instance.
515 *
516 * @syscap SystemCapability.ArkUI.ArkUI.Full
517 * @crossplatform
518 * @form
519 * @since 10
520 */
521/**
522 * Defines Path Component instance.
523 *
524 * @syscap SystemCapability.ArkUI.ArkUI.Full
525 * @crossplatform
526 * @form
527 * @atomicservice
528 * @since 11
529 */
530declare const PathInstance: PathAttribute;
531
532/**
533 * Provides the path drawing interface.
534 *
535 * @interface PathInterface
536 * @syscap SystemCapability.ArkUI.ArkUI.Full
537 * @crossplatform
538 * @form
539 * @atomicservice
540 * @since 20
541 * @arkts 1.2
542 */
543interface PathInterface {
544  /**
545   * Called when drawing path.
546   *
547   * @param { PathOptions } [options] - path options
548   * @returns { PathAttribute }
549   * @syscap SystemCapability.ArkUI.ArkUI.Full
550   * @crossplatform
551   * @form
552   * @atomicservice
553   * @since 20
554   * @arkts 1.2
555   */
556  (options?: PathOptions): PathAttribute;
557}