• 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 interfaces for drawing components.
18 *
19 * @interface ShapeInterface
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 7
22 */
23/**
24 * Provides interfaces for drawing components.
25 *
26 * @interface ShapeInterface
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @since 9
29 * @form
30 */
31/**
32 * Provides interfaces for drawing components.
33 *
34 * @interface ShapeInterface
35 * @syscap SystemCapability.ArkUI.ArkUI.Full
36 * @crossplatform
37 * @since 10
38 * @form
39 */
40/**
41 * Provides interfaces for drawing components.
42 *
43 * @interface ShapeInterface
44 * @syscap SystemCapability.ArkUI.ArkUI.Full
45 * @crossplatform
46 * @atomicservice
47 * @since 11
48 * @form
49 */
50interface ShapeInterface {
51  /**
52   * Use the new function to create Shape.
53   *
54   * @syscap SystemCapability.ArkUI.ArkUI.Full
55   * @since 7
56   */
57  /**
58   * Use the new function to create Shape.
59   *
60   * @syscap SystemCapability.ArkUI.ArkUI.Full
61   * @crossplatform
62   * @since 10
63   */
64  /**
65   * Use the new function to create Shape.
66   *
67   * @syscap SystemCapability.ArkUI.ArkUI.Full
68   * @crossplatform
69   * @atomicservice
70   * @since 11
71   */
72  new (value?: PixelMap): ShapeAttribute;
73
74  /**
75   * Called when a component is drawn.
76   *
77   * @param { PixelMap } value
78   * @returns { ShapeAttribute }
79   * @syscap SystemCapability.ArkUI.ArkUI.Full
80   * @since 7
81   */
82  /**
83   * Called when a component is drawn.
84   *
85   * @param { PixelMap } value
86   * @returns { ShapeAttribute }
87   * @syscap SystemCapability.ArkUI.ArkUI.Full
88   * @crossplatform
89   * @since 10
90   */
91  /**
92   * Called when a component is drawn.
93   *
94   * @param { PixelMap } value
95   * @returns { ShapeAttribute }
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @crossplatform
98   * @atomicservice
99   * @since 11
100   */
101  (value: PixelMap): ShapeAttribute;
102
103  /**
104   * Called when a component is drawn.
105   *
106   * @returns { ShapeAttribute }
107   * @syscap SystemCapability.ArkUI.ArkUI.Full
108   * @since 7
109   */
110  /**
111   * Called when a component is drawn.
112   *
113   * @returns { ShapeAttribute }
114   * @syscap SystemCapability.ArkUI.ArkUI.Full
115   * @since 9
116   * @form
117   */
118  /**
119   * Called when a component is drawn.
120   *
121   * @returns { ShapeAttribute }
122   * @syscap SystemCapability.ArkUI.ArkUI.Full
123   * @crossplatform
124   * @since 10
125   * @form
126   */
127  /**
128   * Called when a component is drawn.
129   *
130   * @returns { ShapeAttribute }
131   * @syscap SystemCapability.ArkUI.ArkUI.Full
132   * @crossplatform
133   * @atomicservice
134   * @since 11
135   * @form
136   */
137  (): ShapeAttribute;
138}
139
140/**
141 * @extends CommonMethod<ShapeAttribute>
142 * @syscap SystemCapability.ArkUI.ArkUI.Full
143 * @since 7
144 */
145/**
146 * @extends CommonMethod<ShapeAttribute>
147 * @syscap SystemCapability.ArkUI.ArkUI.Full
148 * @since 9
149 * @form
150 */
151/**
152 * @extends CommonMethod<ShapeAttribute>
153 * @syscap SystemCapability.ArkUI.ArkUI.Full
154 * @crossplatform
155 * @since 10
156 * @form
157 */
158/**
159 * @extends CommonMethod<ShapeAttribute>
160 * @syscap SystemCapability.ArkUI.ArkUI.Full
161 * @crossplatform
162 * @atomicservice
163 * @since 11
164 * @form
165 */
166declare class ShapeAttribute extends CommonMethod<ShapeAttribute> {
167  /**
168   * Viewport of shape
169   *
170   * @param { object } value
171   * @returns { ShapeAttribute }
172   * @syscap SystemCapability.ArkUI.ArkUI.Full
173   * @since 7
174   */
175  /**
176   * Viewport of shape
177   *
178   * @param { object } value
179   * @returns { ShapeAttribute }
180   * @syscap SystemCapability.ArkUI.ArkUI.Full
181   * @since 9
182   * @form
183   */
184  /**
185   * Viewport of shape
186   *
187   * @param { object } value
188   * @returns { ShapeAttribute }
189   * @syscap SystemCapability.ArkUI.ArkUI.Full
190   * @crossplatform
191   * @since 10
192   * @form
193   */
194  /**
195   * Viewport of shape
196   *
197   * @param { object } value
198   * @returns { ShapeAttribute }
199   * @syscap SystemCapability.ArkUI.ArkUI.Full
200   * @crossplatform
201   * @atomicservice
202   * @since 11
203   * @form
204   */
205  viewPort(value: { x?: number | string; y?: number | string; width?: number | string; height?: number | string }): ShapeAttribute;
206
207  /**
208   * Called when the border color is set.
209   *
210   * @param { ResourceColor } value
211   * @returns { ShapeAttribute }
212   * @syscap SystemCapability.ArkUI.ArkUI.Full
213   * @since 7
214   */
215  /**
216   * Called when the border color is set.
217   *
218   * @param { ResourceColor } value
219   * @returns { ShapeAttribute }
220   * @syscap SystemCapability.ArkUI.ArkUI.Full
221   * @since 9
222   * @form
223   */
224  /**
225   * Called when the border color is set.
226   *
227   * @param { ResourceColor } value
228   * @returns { ShapeAttribute }
229   * @syscap SystemCapability.ArkUI.ArkUI.Full
230   * @crossplatform
231   * @since 10
232   * @form
233   */
234  /**
235   * Called when the border color is set.
236   *
237   * @param { ResourceColor } value
238   * @returns { ShapeAttribute }
239   * @syscap SystemCapability.ArkUI.ArkUI.Full
240   * @crossplatform
241   * @atomicservice
242   * @since 11
243   * @form
244   */
245  stroke(value: ResourceColor): ShapeAttribute;
246
247  /**
248   * Called when the fill color is set.
249   *
250   * @param { ResourceColor } value
251   * @returns { ShapeAttribute }
252   * @syscap SystemCapability.ArkUI.ArkUI.Full
253   * @since 7
254   */
255  /**
256   * Called when the fill color is set.
257   *
258   * @param { ResourceColor } value
259   * @returns { ShapeAttribute }
260   * @syscap SystemCapability.ArkUI.ArkUI.Full
261   * @since 9
262   * @form
263   */
264  /**
265   * Called when the fill color is set.
266   *
267   * @param { ResourceColor } value
268   * @returns { ShapeAttribute }
269   * @syscap SystemCapability.ArkUI.ArkUI.Full
270   * @crossplatform
271   * @since 10
272   * @form
273   */
274  /**
275   * Called when the fill color is set.
276   *
277   * @param { ResourceColor } value
278   * @returns { ShapeAttribute }
279   * @syscap SystemCapability.ArkUI.ArkUI.Full
280   * @crossplatform
281   * @atomicservice
282   * @since 11
283   * @form
284   */
285  fill(value: ResourceColor): ShapeAttribute;
286
287  /**
288   * Called when the offset of the starting point of border drawing is set.
289   *
290   * @param { number | string } value
291   * @returns { ShapeAttribute }
292   * @syscap SystemCapability.ArkUI.ArkUI.Full
293   * @since 7
294   */
295  /**
296   * Called when the offset of the starting point of border drawing is set.
297   *
298   * @param { number | string } value
299   * @returns { ShapeAttribute }
300   * @syscap SystemCapability.ArkUI.ArkUI.Full
301   * @since 9
302   * @form
303   */
304  /**
305   * Called when the offset of the starting point of border drawing is set.
306   *
307   * @param { number | string } value
308   * @returns { ShapeAttribute }
309   * @syscap SystemCapability.ArkUI.ArkUI.Full
310   * @crossplatform
311   * @since 10
312   * @form
313   */
314  /**
315   * Called when the offset of the starting point of border drawing is set.
316   *
317   * @param { number | string } value
318   * @returns { ShapeAttribute }
319   * @syscap SystemCapability.ArkUI.ArkUI.Full
320   * @crossplatform
321   * @atomicservice
322   * @since 11
323   * @form
324   */
325  strokeDashOffset(value: number | string): ShapeAttribute;
326
327  /**
328   * Called when the gap of the border is set.
329   *
330   * @param { Array<any> } value
331   * @returns { ShapeAttribute }
332   * @syscap SystemCapability.ArkUI.ArkUI.Full
333   * @since 7
334   */
335  /**
336   * Called when the gap of the border is set.
337   *
338   * @param { Array<any> } value
339   * @returns { ShapeAttribute }
340   * @syscap SystemCapability.ArkUI.ArkUI.Full
341   * @since 9
342   * @form
343   */
344  /**
345   * Called when the gap of the border is set.
346   *
347   * @param { Array<any> } value
348   * @returns { ShapeAttribute }
349   * @syscap SystemCapability.ArkUI.ArkUI.Full
350   * @crossplatform
351   * @since 10
352   * @form
353   */
354  /**
355   * Called when the gap of the border is set.
356   *
357   * @param { Array<any> } value
358   * @returns { ShapeAttribute }
359   * @syscap SystemCapability.ArkUI.ArkUI.Full
360   * @crossplatform
361   * @atomicservice
362   * @since 11
363   * @form
364   */
365  strokeDashArray(value: Array<any>): ShapeAttribute;
366
367  /**
368   * Called when the path endpoint drawing style is set.
369   *
370   * @param { LineCapStyle } value
371   * @returns { ShapeAttribute }
372   * @syscap SystemCapability.ArkUI.ArkUI.Full
373   * @since 7
374   */
375  /**
376   * Called when the path endpoint drawing style is set.
377   *
378   * @param { LineCapStyle } value
379   * @returns { ShapeAttribute }
380   * @syscap SystemCapability.ArkUI.ArkUI.Full
381   * @since 9
382   * @form
383   */
384  /**
385   * Called when the path endpoint drawing style is set.
386   *
387   * @param { LineCapStyle } value
388   * @returns { ShapeAttribute }
389   * @syscap SystemCapability.ArkUI.ArkUI.Full
390   * @crossplatform
391   * @since 10
392   * @form
393   */
394  /**
395   * Called when the path endpoint drawing style is set.
396   *
397   * @param { LineCapStyle } value
398   * @returns { ShapeAttribute }
399   * @syscap SystemCapability.ArkUI.ArkUI.Full
400   * @crossplatform
401   * @atomicservice
402   * @since 11
403   * @form
404   */
405  strokeLineCap(value: LineCapStyle): ShapeAttribute;
406
407  /**
408   * Called when the border corner drawing style is set.
409   *
410   * @param { LineJoinStyle } value
411   * @returns { ShapeAttribute }
412   * @syscap SystemCapability.ArkUI.ArkUI.Full
413   * @since 7
414   */
415  /**
416   * Called when the border corner drawing style is set.
417   *
418   * @param { LineJoinStyle } value
419   * @returns { ShapeAttribute }
420   * @syscap SystemCapability.ArkUI.ArkUI.Full
421   * @since 9
422   * @form
423   */
424  /**
425   * Called when the border corner drawing style is set.
426   *
427   * @param { LineJoinStyle } value
428   * @returns { ShapeAttribute }
429   * @syscap SystemCapability.ArkUI.ArkUI.Full
430   * @crossplatform
431   * @since 10
432   * @form
433   */
434  /**
435   * Called when the border corner drawing style is set.
436   *
437   * @param { LineJoinStyle } value
438   * @returns { ShapeAttribute }
439   * @syscap SystemCapability.ArkUI.ArkUI.Full
440   * @crossplatform
441   * @atomicservice
442   * @since 11
443   * @form
444   */
445  strokeLineJoin(value: LineJoinStyle): ShapeAttribute;
446
447  /**
448   * Called when the limit value for drawing acute angles as oblique angles is set.
449   *
450   * @param { number | string } value
451   * @returns { ShapeAttribute }
452   * @syscap SystemCapability.ArkUI.ArkUI.Full
453   * @since 7
454   */
455  /**
456   * Called when the limit value for drawing acute angles as oblique angles is set.
457   *
458   * @param { number | string } value
459   * @returns { ShapeAttribute }
460   * @syscap SystemCapability.ArkUI.ArkUI.Full
461   * @since 9
462   * @form
463   */
464  /**
465   * Called when the limit value for drawing acute angles as oblique angles is set.
466   *
467   * @param { number | string } value
468   * @returns { ShapeAttribute }
469   * @syscap SystemCapability.ArkUI.ArkUI.Full
470   * @crossplatform
471   * @since 10
472   * @form
473   */
474  /**
475   * Called when the limit value for drawing acute angles as oblique angles is set.
476   *
477   * @param { number | string } value
478   * @returns { ShapeAttribute }
479   * @syscap SystemCapability.ArkUI.ArkUI.Full
480   * @crossplatform
481   * @atomicservice
482   * @since 11
483   * @form
484   */
485  strokeMiterLimit(value: number | string): ShapeAttribute;
486
487  /**
488   * Called when the opacity of the border is set.
489   *
490   * @param { number | string | Resource } value
491   * @returns { ShapeAttribute }
492   * @syscap SystemCapability.ArkUI.ArkUI.Full
493   * @since 7
494   */
495  /**
496   * Called when the opacity of the border is set.
497   *
498   * @param { number | string | Resource } value
499   * @returns { ShapeAttribute }
500   * @syscap SystemCapability.ArkUI.ArkUI.Full
501   * @since 9
502   * @form
503   */
504  /**
505   * Called when the opacity of the border is set.
506   *
507   * @param { number | string | Resource } value
508   * @returns { ShapeAttribute }
509   * @syscap SystemCapability.ArkUI.ArkUI.Full
510   * @crossplatform
511   * @since 10
512   * @form
513   */
514  /**
515   * Called when the opacity of the border is set.
516   *
517   * @param { number | string | Resource } value
518   * @returns { ShapeAttribute }
519   * @syscap SystemCapability.ArkUI.ArkUI.Full
520   * @crossplatform
521   * @atomicservice
522   * @since 11
523   * @form
524   */
525  strokeOpacity(value: number | string | Resource): ShapeAttribute;
526
527  /**
528   * Called when the transparency of the border is set.
529   *
530   * @param { number | string | Resource } value
531   * @returns { ShapeAttribute }
532   * @syscap SystemCapability.ArkUI.ArkUI.Full
533   * @since 7
534   */
535  /**
536   * Called when the transparency of the border is set.
537   *
538   * @param { number | string | Resource } value
539   * @returns { ShapeAttribute }
540   * @syscap SystemCapability.ArkUI.ArkUI.Full
541   * @since 9
542   * @form
543   */
544  /**
545   * Called when the transparency of the border is set.
546   *
547   * @param { number | string | Resource } value
548   * @returns { ShapeAttribute }
549   * @syscap SystemCapability.ArkUI.ArkUI.Full
550   * @crossplatform
551   * @since 10
552   * @form
553   */
554  /**
555   * Called when the transparency of the border is set.
556   *
557   * @param { number | string | Resource } value
558   * @returns { ShapeAttribute }
559   * @syscap SystemCapability.ArkUI.ArkUI.Full
560   * @crossplatform
561   * @atomicservice
562   * @since 11
563   * @form
564   */
565  fillOpacity(value: number | string | Resource): ShapeAttribute;
566
567  /**
568   * Called when the width of the border is set.
569   *
570   * @param { number | string } value
571   * @returns { ShapeAttribute }
572   * @syscap SystemCapability.ArkUI.ArkUI.Full
573   * @since 7
574   */
575  /**
576   * Called when the width of the border is set.
577   *
578   * @param { number | string } value
579   * @returns { ShapeAttribute }
580   * @syscap SystemCapability.ArkUI.ArkUI.Full
581   * @since 9
582   * @form
583   */
584  /**
585   * Called when the width of the border is set.
586   *
587   * @param { number | string } value
588   * @returns { ShapeAttribute }
589   * @syscap SystemCapability.ArkUI.ArkUI.Full
590   * @crossplatform
591   * @since 10
592   * @form
593   */
594  /**
595   * Called when the width of the border is set.
596   *
597   * @param { number | string } value
598   * @returns { ShapeAttribute }
599   * @syscap SystemCapability.ArkUI.ArkUI.Full
600   * @crossplatform
601   * @atomicservice
602   * @since 11
603   * @form
604   */
605  strokeWidth(value: number | string): ShapeAttribute;
606
607  /**
608   * Called when setting whether anti aliasing is on.
609   *
610   * @param { boolean } value
611   * @returns { ShapeAttribute }
612   * @syscap SystemCapability.ArkUI.ArkUI.Full
613   * @since 7
614   */
615  /**
616   * Called when setting whether anti aliasing is on.
617   *
618   * @param { boolean } value
619   * @returns { ShapeAttribute }
620   * @syscap SystemCapability.ArkUI.ArkUI.Full
621   * @since 9
622   * @form
623   */
624  /**
625   * Called when setting whether anti aliasing is on.
626   *
627   * @param { boolean } value
628   * @returns { ShapeAttribute }
629   * @syscap SystemCapability.ArkUI.ArkUI.Full
630   * @crossplatform
631   * @since 10
632   * @form
633   */
634  /**
635   * Called when setting whether anti aliasing is on.
636   *
637   * @param { boolean } value
638   * @returns { ShapeAttribute }
639   * @syscap SystemCapability.ArkUI.ArkUI.Full
640   * @crossplatform
641   * @atomicservice
642   * @since 11
643   * @form
644   */
645  antiAlias(value: boolean): ShapeAttribute;
646
647  /**
648   * Called when shape mesh.
649   *
650   * @param { Array<any> } value
651   * @param { number } column
652   * @param { number } row
653   * @returns { ShapeAttribute }
654   * @syscap SystemCapability.ArkUI.ArkUI.Full
655   * @since 8
656   */
657  /**
658   * Called when shape mesh.
659   *
660   * @param { Array<any> } value
661   * @param { number } column
662   * @param { number } row
663   * @returns { ShapeAttribute }
664   * @syscap SystemCapability.ArkUI.ArkUI.Full
665   * @since 9
666   * @form
667   */
668  /**
669   * Called when shape mesh.
670   *
671   * @param { Array<any> } value
672   * @param { number } column
673   * @param { number } row
674   * @returns { ShapeAttribute }
675   * @syscap SystemCapability.ArkUI.ArkUI.Full
676   * @crossplatform
677   * @since 10
678   * @form
679   */
680  /**
681   * Called when shape mesh.
682   *
683   * @param { Array<any> } value
684   * @param { number } column
685   * @param { number } row
686   * @returns { ShapeAttribute }
687   * @syscap SystemCapability.ArkUI.ArkUI.Full
688   * @crossplatform
689   * @atomicservice
690   * @since 11
691   * @form
692   */
693  mesh(value: Array<any>, column: number, row: number): ShapeAttribute;
694}
695
696/**
697 * Defines Shape Component.
698 *
699 * @syscap SystemCapability.ArkUI.ArkUI.Full
700 * @since 7
701 */
702/**
703 * Defines Shape Component.
704 *
705 * @syscap SystemCapability.ArkUI.ArkUI.Full
706 * @since 9
707 * @form
708 */
709/**
710 * Defines Shape Component.
711 *
712 * @syscap SystemCapability.ArkUI.ArkUI.Full
713 * @crossplatform
714 * @since 10
715 * @form
716 */
717/**
718 * Defines Shape Component.
719 *
720 * @syscap SystemCapability.ArkUI.ArkUI.Full
721 * @crossplatform
722 * @atomicservice
723 * @since 11
724 * @form
725 */
726declare const Shape: ShapeInterface;
727
728/**
729 * Defines Shape Component instance.
730 *
731 * @syscap SystemCapability.ArkUI.ArkUI.Full
732 * @since 7
733 */
734/**
735 * Defines Shape Component instance.
736 *
737 * @syscap SystemCapability.ArkUI.ArkUI.Full
738 * @since 9
739 * @form
740 */
741/**
742 * Defines Shape Component instance.
743 *
744 * @syscap SystemCapability.ArkUI.ArkUI.Full
745 * @crossplatform
746 * @since 10
747 * @form
748 */
749/**
750 * Defines Shape Component instance.
751 *
752 * @syscap SystemCapability.ArkUI.ArkUI.Full
753 * @crossplatform
754 * @atomicservice
755 * @since 11
756 * @form
757 */
758declare const ShapeInstance: ShapeAttribute;
759