• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2020-2021 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
16import { Image, ImageData, ImageBitmap } from "./global";
17import image from "../../@ohos.multimedia.image";
18import { CanvasPattern } from './canvaspattern';
19
20/**
21 * Defines the focus param.
22 *
23 * @interface FocusParamObj
24 * @syscap SystemCapability.ArkUI.ArkUI.Full
25 * @since 3
26 */
27/**
28 * Defines the focus param.
29 *
30 * @interface FocusParamObj
31 * @syscap SystemCapability.ArkUI.ArkUI.Full
32 * @atomicservice
33 * @since 11
34 */
35export interface FocusParamObj {
36  /**
37   * Whether needs to focus.
38   *
39   * @type { boolean }
40   * @syscap SystemCapability.ArkUI.ArkUI.Full
41   * @since 3
42   */
43  /**
44   * Whether needs to focus.
45   *
46   * @type { boolean }
47   * @syscap SystemCapability.ArkUI.ArkUI.Full
48   * @atomicservice
49   * @since 11
50   */
51  focus: boolean;
52}
53
54/**
55 * RectObj
56 *
57 * @interface RectObj
58 * @syscap SystemCapability.ArkUI.ArkUI.Full
59 * @since 6
60 */
61/**
62 * RectObj
63 *
64 * @interface RectObj
65 * @syscap SystemCapability.ArkUI.ArkUI.Full
66 * @atomicservice
67 * @since 11
68 */
69export interface RectObj {
70  /**
71   * @type { number }
72   * @syscap SystemCapability.ArkUI.ArkUI.Full
73   * @since 6
74   */
75  /**
76   * @type { number }
77   * @syscap SystemCapability.ArkUI.ArkUI.Full
78   * @atomicservice
79   * @since 11
80   */
81  width: number;
82  /**
83   * @type { number }
84   * @syscap SystemCapability.ArkUI.ArkUI.Full
85   * @since 6
86   */
87  /**
88   * @type { number }
89   * @syscap SystemCapability.ArkUI.ArkUI.Full
90   * @atomicservice
91   * @since 11
92   */
93  height: number;
94  /**
95   * @type { number }
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @since 6
98   */
99  /**
100   * @type { number }
101   * @syscap SystemCapability.ArkUI.ArkUI.Full
102   * @atomicservice
103   * @since 11
104   */
105  left: number;
106  /**
107   * @type { number }
108   * @syscap SystemCapability.ArkUI.ArkUI.Full
109   * @since 6
110   */
111  /**
112   * @type { number }
113   * @syscap SystemCapability.ArkUI.ArkUI.Full
114   * @atomicservice
115   * @since 11
116   */
117  top: number;
118}
119
120/**
121 * ContextAttrOptions
122 *
123 * @interface ContextAttrOptions
124 * @syscap SystemCapability.ArkUI.ArkUI.Full
125 * @since 6
126 */
127/**
128 * ContextAttrOptions
129 *
130 * @interface ContextAttrOptions
131 * @syscap SystemCapability.ArkUI.ArkUI.Full
132 * @atomicservice
133 * @since 11
134 */
135export interface ContextAttrOptions {
136  /**
137   * @type { boolean }
138   * @syscap SystemCapability.ArkUI.ArkUI.Full
139   * @since 6
140   */
141  /**
142   * @type { boolean }
143   * @syscap SystemCapability.ArkUI.ArkUI.Full
144   * @atomicservice
145   * @since 11
146   */
147  antialias: boolean;
148}
149
150/**
151 * AnimateStyle
152 *
153 * @interface AnimateStyle
154 * @syscap SystemCapability.ArkUI.ArkUI.Full
155 * @since 4
156 */
157/**
158 * AnimateStyle
159 *
160 * @interface AnimateStyle
161 * @syscap SystemCapability.ArkUI.ArkUI.Full
162 * @atomicservice
163 * @since 11
164 */
165export interface AnimateStyle {
166  /**
167   * Width value applied to the component after the animation is executed.
168   *
169   * @type { number }
170   * @syscap SystemCapability.ArkUI.ArkUI.Full
171   * @since 4
172   */
173  /**
174   * Width value applied to the component after the animation is executed.
175   *
176   * @type { number }
177   * @syscap SystemCapability.ArkUI.ArkUI.Full
178   * @atomicservice
179   * @since 11
180   */
181  width: number;
182  /**
183   * Height value applied to the component after the animation is executed.
184   *
185   * @type { number }
186   * @syscap SystemCapability.ArkUI.ArkUI.Full
187   * @since 4
188   */
189  /**
190   * Height value applied to the component after the animation is executed.
191   *
192   * @type { number }
193   * @syscap SystemCapability.ArkUI.ArkUI.Full
194   * @atomicservice
195   * @since 11
196   */
197  height: number;
198  /**
199   * left offset applied to the component after the animation is executed.
200   *
201   * @type { number }
202   * @syscap SystemCapability.ArkUI.ArkUI.Full
203   * @since 4
204   */
205  /**
206   * left offset applied to the component after the animation is executed.
207   *
208   * @type { number }
209   * @syscap SystemCapability.ArkUI.ArkUI.Full
210   * @atomicservice
211   * @since 11
212   */
213  left: number;
214  /**
215   * top offset applied to the component after the animation is executed.
216   *
217   * @type { number }
218   * @syscap SystemCapability.ArkUI.ArkUI.Full
219   * @since 4
220   */
221  /**
222   * top offset applied to the component after the animation is executed.
223   *
224   * @type { number }
225   * @syscap SystemCapability.ArkUI.ArkUI.Full
226   * @atomicservice
227   * @since 11
228   */
229  top: number;
230  /**
231   * right offset applied to the component after the animation is executed.
232   *
233   * @type { number }
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @since 4
236   */
237  /**
238   * right offset applied to the component after the animation is executed.
239   *
240   * @type { number }
241   * @syscap SystemCapability.ArkUI.ArkUI.Full
242   * @atomicservice
243   * @since 11
244   */
245  right: number;
246  /**
247   * bottom offset applied to the component after the animation is executed.
248   *
249   * @type { number }
250   * @syscap SystemCapability.ArkUI.ArkUI.Full
251   * @since 4
252   */
253  /**
254   * bottom offset applied to the component after the animation is executed.
255   *
256   * @type { number }
257   * @syscap SystemCapability.ArkUI.ArkUI.Full
258   * @atomicservice
259   * @since 11
260   */
261  bottom: number;
262  /**
263   * Background color applied to the component after the animation is executed.
264   * The default value is none.
265   *
266   * @type { string }
267   * @syscap SystemCapability.ArkUI.ArkUI.Full
268   * @since 4
269   */
270  /**
271   * Background color applied to the component after the animation is executed.
272   * The default value is none.
273   *
274   * @type { string }
275   * @syscap SystemCapability.ArkUI.ArkUI.Full
276   * @atomicservice
277   * @since 11
278   */
279  backgroundColor: string;
280  /**
281   * Opacity applied to the component. The value ranges from 0 to 1.
282   * The default value is 1.
283   *
284   * @type { number }
285   * @syscap SystemCapability.ArkUI.ArkUI.Full
286   * @since 4
287   */
288  /**
289   * Opacity applied to the component. The value ranges from 0 to 1.
290   * The default value is 1.
291   *
292   * @type { number }
293   * @syscap SystemCapability.ArkUI.ArkUI.Full
294   * @atomicservice
295   * @since 11
296   */
297  opacity: number;
298  /**
299   * The value format is "x y", in percentage or pixels.
300   * The first value indicates the horizontal position, and the second value indicates the vertical position.
301   * If only one value is specified, the other value is 50% by default.
302   *
303   * @type { string }
304   * @syscap SystemCapability.ArkUI.ArkUI.Full
305   * @since 4
306   */
307  /**
308   * The value format is "x y", in percentage or pixels.
309   * The first value indicates the horizontal position, and the second value indicates the vertical position.
310   * If only one value is specified, the other value is 50% by default.
311   *
312   * @type { string }
313   * @syscap SystemCapability.ArkUI.ArkUI.Full
314   * @atomicservice
315   * @since 11
316   */
317  backgroundPosition: string;
318  /**
319   * Origin position of the transformed element.
320   * The first value indicates the x-axis position. The value can be left, center, right, a length, or percentage.
321   * The second value indicates the y-axis position. The value can be top, center, bottom, a length, or a percentage.
322   *
323   * @type { string }
324   * @syscap SystemCapability.ArkUI.ArkUI.Full
325   * @since 4
326   */
327  /**
328   * Origin position of the transformed element.
329   * The first value indicates the x-axis position. The value can be left, center, right, a length, or percentage.
330   * The second value indicates the y-axis position. The value can be top, center, bottom, a length, or a percentage.
331   *
332   * @type { string }
333   * @syscap SystemCapability.ArkUI.ArkUI.Full
334   * @atomicservice
335   * @since 11
336   */
337  transformOrigin: string;
338  /**
339   * Transformation type applied to an element.
340   *
341   * @type { "none" | TransformObject }
342   * @syscap SystemCapability.ArkUI.ArkUI.Full
343   * @since 4
344   */
345  /**
346   * Transformation type applied to an element.
347   *
348   * @type { "none" | TransformObject }
349   * @syscap SystemCapability.ArkUI.ArkUI.Full
350   * @atomicservice
351   * @since 11
352   */
353  transform: "none" | TransformObject;
354  /**
355   * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided.
356   * If there are only two frames, offset can be left empty.
357   * If there are more than two frames, offset is mandatory.
358   *
359   * @type { ?number }
360   * @syscap SystemCapability.ArkUI.ArkUI.Full
361   * @since 4
362   */
363  /**
364   * The value of offset must be within (0.0,1.0] and sorted in ascending order if it is provided.
365   * If there are only two frames, offset can be left empty.
366   * If there are more than two frames, offset is mandatory.
367   *
368   * @type { ?number }
369   * @syscap SystemCapability.ArkUI.ArkUI.Full
370   * @atomicservice
371   * @since 11
372   */
373  offset?: number;
374}
375
376/**
377 * TransformObject
378 *
379 * @interface TransformObject
380 * @syscap SystemCapability.ArkUI.ArkUI.Full
381 * @since 4
382 */
383/**
384 * TransformObject
385 *
386 * @interface TransformObject
387 * @syscap SystemCapability.ArkUI.ArkUI.Full
388 * @atomicservice
389 * @since 11
390 */
391export interface TransformObject {
392  /**
393   * Defines a 2D transformation, using a matrix of six values..
394   *
395   * @param { number } scaleX - the scale value for x-axis
396   * @param { number } skewX - the skew value for y-axis
397   * @param { number } skewY - the skew value for x-axis
398   * @param { number } scaleY - the scale value for y-axis
399   * @param { number } translateX - the translate value for x-axis
400   * @param { number } translateY - the translate value for y-axis
401   * @syscap SystemCapability.ArkUI.ArkUI.Full
402   * @since 6
403   */
404  /**
405   * Defines a 2D transformation, using a matrix of six values..
406   *
407   * @param { number } scaleX - the scale value for x-axis
408   * @param { number } skewX - the skew value for y-axis
409   * @param { number } skewY - the skew value for x-axis
410   * @param { number } scaleY - the scale value for y-axis
411   * @param { number } translateX - the translate value for x-axis
412   * @param { number } translateY - the translate value for y-axis
413   * @syscap SystemCapability.ArkUI.ArkUI.Full
414   * @atomicservice
415   * @since 11
416   */
417  matrix(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void;
418  /**
419   * Defines a 3D transformation using a 4x4 matrix of 16 values.
420   *
421   * @param { number } n00 - the value of the 0 row and 0 column of the 4x4 matrix
422   * @param { number } n01 - the value of the 0 row and 1 column of the 4x4 matrix
423   * @param { number } n02 - the value of the 0 row and 2 column of the 4x4 matrix
424   * @param { number } n03 - the value of the 0 row and 3 column of the 4x4 matrix
425   * @param { number } n10 - the value of the 1 row and 0 column of the 4x4 matrix
426   * @param { number } n11 - the value of the 1 row and 1 column of the 4x4 matrix
427   * @param { number } n12 - the value of the 1 row and 2 column of the 4x4 matrix
428   * @param { number } n13 - the value of the 1 row and 3 column of the 4x4 matrix
429   * @param { number } n20 - the value of the 2 row and 0 column of the 4x4 matrix
430   * @param { number } n21 - the value of the 2 row and 1 column of the 4x4 matrix
431   * @param { number } n22 - the value of the 2 row and 2 column of the 4x4 matrix
432   * @param { number } n23 - the value of the 2 row and 3 column of the 4x4 matrix
433   * @param { number } n30 - the value of the 3 row and 0 column of the 4x4 matrix
434   * @param { number } n31 - the value of the 3 row and 1 column of the 4x4 matrix
435   * @param { number } n32 - the value of the 3 row and 2 column of the 4x4 matrix
436   * @param { number } n33 - the value of the 3 row and 3 column of the 4x4 matrix
437   * @syscap SystemCapability.ArkUI.ArkUI.Full
438   * @since 6
439   */
440  /**
441   * Defines a 3D transformation using a 4x4 matrix of 16 values.
442   *
443   * @param { number } n00 - the value of the 0 row and 0 column of the 4x4 matrix
444   * @param { number } n01 - the value of the 0 row and 1 column of the 4x4 matrix
445   * @param { number } n02 - the value of the 0 row and 2 column of the 4x4 matrix
446   * @param { number } n03 - the value of the 0 row and 3 column of the 4x4 matrix
447   * @param { number } n10 - the value of the 1 row and 0 column of the 4x4 matrix
448   * @param { number } n11 - the value of the 1 row and 1 column of the 4x4 matrix
449   * @param { number } n12 - the value of the 1 row and 2 column of the 4x4 matrix
450   * @param { number } n13 - the value of the 1 row and 3 column of the 4x4 matrix
451   * @param { number } n20 - the value of the 2 row and 0 column of the 4x4 matrix
452   * @param { number } n21 - the value of the 2 row and 1 column of the 4x4 matrix
453   * @param { number } n22 - the value of the 2 row and 2 column of the 4x4 matrix
454   * @param { number } n23 - the value of the 2 row and 3 column of the 4x4 matrix
455   * @param { number } n30 - the value of the 3 row and 0 column of the 4x4 matrix
456   * @param { number } n31 - the value of the 3 row and 1 column of the 4x4 matrix
457   * @param { number } n32 - the value of the 3 row and 2 column of the 4x4 matrix
458   * @param { number } n33 - the value of the 3 row and 3 column of the 4x4 matrix
459   * @syscap SystemCapability.ArkUI.ArkUI.Full
460   * @atomicservice
461   * @since 11
462   */
463  matrix3d(
464    n00: number,
465    n01: number,
466    n02: number,
467    n03: number,
468    n10: number,
469    n11: number,
470    n12: number,
471    n13: number,
472    n20: number,
473    n21: number,
474    n22: number,
475    n23: number,
476    n30: number,
477    n31: number,
478    n32: number,
479    n33: number,
480  ): void;
481  /**
482   * Defines 2D transformations for translation of the X and Y axes
483   *
484   * @param { number } x - the translate value for x-axis
485   * @param { number } y - the translate value for y-axis
486   * @syscap SystemCapability.ArkUI.ArkUI.Full
487   * @since 4
488   */
489  /**
490   * Defines 2D transformations for translation of the X and Y axes
491   *
492   * @param { number } x - the translate value for x-axis
493   * @param { number } y - the translate value for y-axis
494   * @syscap SystemCapability.ArkUI.ArkUI.Full
495   * @atomicservice
496   * @since 11
497   */
498  translate(x: number, y: number): void;
499  /**
500   * Defines 3D transformations for translation of the X / Y / Z axes
501   *
502   * @param { number } x - the translate value for x-axis
503   * @param { number } y - the translate value for y-axis
504   * @param { number } z - the translate value for z-axis
505   * @syscap SystemCapability.ArkUI.ArkUI.Full
506   * @since 6
507   */
508  /**
509   * Defines 3D transformations for translation of the X / Y / Z axes
510   *
511   * @param { number } x - the translate value for x-axis
512   * @param { number } y - the translate value for y-axis
513   * @param { number } z - the translate value for z-axis
514   * @syscap SystemCapability.ArkUI.ArkUI.Full
515   * @atomicservice
516   * @since 11
517   */
518  translate3d(x: number, y: number, z: number): void;
519  /**
520   * Defines 2D transformations for translation of the X axes
521   *
522   * @param { number } x - the translate value for x-axis
523   * @syscap SystemCapability.ArkUI.ArkUI.Full
524   * @since 4
525   */
526  /**
527   * Defines 2D transformations for translation of the X axes
528   *
529   * @param { number } x - the translate value for x-axis
530   * @syscap SystemCapability.ArkUI.ArkUI.Full
531   * @atomicservice
532   * @since 11
533   */
534  translateX(x: number): void;
535  /**
536   * Defines 2D transformations for translation of the Y axes
537   *
538   * @param { number } y - the translate value for y-axis
539   * @syscap SystemCapability.ArkUI.ArkUI.Full
540   * @since 4
541   */
542  /**
543   * Defines 2D transformations for translation of the Y axes
544   *
545   * @param { number } y - the translate value for y-axis
546   * @syscap SystemCapability.ArkUI.ArkUI.Full
547   * @atomicservice
548   * @since 11
549   */
550  translateY(y: number): void;
551  /**
552   * Defines 3D transformations for translation of the Z axes
553   *
554   * @param { number } z the translate value for z-axis
555   * @syscap SystemCapability.ArkUI.ArkUI.Full
556   * @since 6
557   */
558  /**
559   * Defines 3D transformations for translation of the Z axes
560   *
561   * @param { number } z the translate value for z-axis
562   * @syscap SystemCapability.ArkUI.ArkUI.Full
563   * @atomicservice
564   * @since 11
565   */
566  translateZ(z: number): void;
567  /**
568   * Defines 2D transformations for scaling of the X and Y axes
569   *
570   * @param { number } x - the scale value for x-axis
571   * @param { number } y - the scale value for y-axis
572   * @syscap SystemCapability.ArkUI.ArkUI.Full
573   * @since 4
574   */
575  /**
576   * Defines 2D transformations for scaling of the X and Y axes
577   *
578   * @param { number } x - the scale value for x-axis
579   * @param { number } y - the scale value for y-axis
580   * @syscap SystemCapability.ArkUI.ArkUI.Full
581   * @atomicservice
582   * @since 11
583   */
584  scale(x: number, y: number): void;
585  /**
586   * Defines 3D transformations for scaling of the X / Y / Z axes
587   *
588   * @param { number } x - the scale value for x-axis
589   * @param { number } y - the scale value for y-axis
590   * @param { number } z - the scale value for z-axis
591   * @syscap SystemCapability.ArkUI.ArkUI.Full
592   * @since 6
593   */
594  /**
595   * Defines 3D transformations for scaling of the X / Y / Z axes
596   *
597   * @param { number } x - the scale value for x-axis
598   * @param { number } y - the scale value for y-axis
599   * @param { number } z - the scale value for z-axis
600   * @syscap SystemCapability.ArkUI.ArkUI.Full
601   * @atomicservice
602   * @since 11
603   */
604  scale3d(x: number, y: number, z: number): void;
605  /**
606   * Defines 2D transformations for scaling of the X axes
607   *
608   * @param { number } x - the scale value for x-axis
609   * @syscap SystemCapability.ArkUI.ArkUI.Full
610   * @since 4
611   */
612  /**
613   * Defines 2D transformations for scaling of the X axes
614   *
615   * @param { number } x - the scale value for x-axis
616   * @syscap SystemCapability.ArkUI.ArkUI.Full
617   * @atomicservice
618   * @since 11
619   */
620  scaleX(x: number): void;
621  /**
622   * Defines 2D transformations for scaling of the Y axes
623   *
624   * @param { number } y - the scale value for y-axis
625   * @syscap SystemCapability.ArkUI.ArkUI.Full
626   * @since 4
627   */
628  /**
629   * Defines 2D transformations for scaling of the Y axes
630   *
631   * @param { number } y - the scale value for y-axis
632   * @syscap SystemCapability.ArkUI.ArkUI.Full
633   * @atomicservice
634   * @since 11
635   */
636  scaleY(y: number): void;
637  /**
638   * Defines 3D transformations for scaling of the Z axes
639   *
640   * @param { number } z - the scale value for z-axis
641   * @syscap SystemCapability.ArkUI.ArkUI.Full
642   * @since 6
643   */
644  /**
645   * Defines 3D transformations for scaling of the Z axes
646   *
647   * @param { number } z - the scale value for z-axis
648   * @syscap SystemCapability.ArkUI.ArkUI.Full
649   * @atomicservice
650   * @since 11
651   */
652  scaleZ(z: number): void;
653  /**
654   * Define the 2D rotation and specify the angle in the parameters.
655   *
656   * @param { number } angle - the rotate value for z-axis
657   * @syscap SystemCapability.ArkUI.ArkUI.Full
658   * @since 4
659   */
660  /**
661   * Define the 2D rotation and specify the angle in the parameters.
662   *
663   * @param { number } angle - the rotate value for z-axis
664   * @syscap SystemCapability.ArkUI.ArkUI.Full
665   * @atomicservice
666   * @since 11
667   */
668  rotate(angle: number): void;
669  /**
670   * Defines a 3D transformation for rotating the X / Y / Z axes.
671   *
672   * @param { number } x - the vector value of the x-axis
673   * @param { number } y - the vector value of the y-axis
674   * @param { number } z - the vector value of the z-axis
675   * @param { number } angle - the rotate value for x&y&z vector.
676   * @syscap SystemCapability.ArkUI.ArkUI.Full
677   * @since 6
678   */
679  /**
680   * Defines a 3D transformation for rotating the X / Y / Z axes.
681   *
682   * @param { number } x - the vector value of the x-axis
683   * @param { number } y - the vector value of the y-axis
684   * @param { number } z - the vector value of the z-axis
685   * @param { number } angle - the rotate value for x&y&z vector.
686   * @syscap SystemCapability.ArkUI.ArkUI.Full
687   * @atomicservice
688   * @since 11
689   */
690  rotate3d(x: number, y: number, z: number, angle: number): void;
691  /**
692   * Defines 3D transformations for rotating of the X axes.
693   *
694   * @param { number } angle - the scale value for x-axis
695   * @syscap SystemCapability.ArkUI.ArkUI.Full
696   * @since 4
697   */
698  /**
699   * Defines 3D transformations for rotating of the X axes.
700   *
701   * @param { number } angle - the scale value for x-axis
702   * @syscap SystemCapability.ArkUI.ArkUI.Full
703   * @atomicservice
704   * @since 11
705   */
706  rotateX(angle: number): void;
707  /**
708   * Defines 3D transformations for rotating of the Y axes.
709   *
710   * @param { number } angle - the scale value for y-axis
711   * @syscap SystemCapability.ArkUI.ArkUI.Full
712   * @since 4
713   */
714  /**
715   * Defines 3D transformations for rotating of the Y axes.
716   *
717   * @param { number } angle - the scale value for y-axis
718   * @syscap SystemCapability.ArkUI.ArkUI.Full
719   * @atomicservice
720   * @since 11
721   */
722  rotateY(angle: number): void;
723  /**
724   * Defines 3D transformations for rotating of the Z axes.
725   *
726   * @param { number } angle - the scale value for z-axis
727   * @syscap SystemCapability.ArkUI.ArkUI.Full
728   * @since 6
729   */
730  /**
731   * Defines 3D transformations for rotating of the Z axes.
732   *
733   * @param { number } angle - the scale value for z-axis
734   * @syscap SystemCapability.ArkUI.ArkUI.Full
735   * @atomicservice
736   * @since 11
737   */
738  rotateZ(angle: number): void;
739  /**
740   * Defines the 2D skew transition along the X and Y axes.
741   *
742   * @param { number } xAngle - the angle of inclination along the x axis.
743   * @param { number } yAngle - the angle of inclination along the y axis.
744   * @syscap SystemCapability.ArkUI.ArkUI.Full
745   * @since 6
746   */
747  /**
748   * Defines the 2D skew transition along the X and Y axes.
749   *
750   * @param { number } xAngle - the angle of inclination along the x axis.
751   * @param { number } yAngle - the angle of inclination along the y axis.
752   * @syscap SystemCapability.ArkUI.ArkUI.Full
753   * @atomicservice
754   * @since 11
755   */
756  skew(xAngle: number, yAngle: number): void;
757  /**
758   * Defines the 2D skew transition along the X axes.
759   *
760   * @param { number } angle - the angle of inclination along the x axis.
761   * @syscap SystemCapability.ArkUI.ArkUI.Full
762   * @since 6
763   */
764  /**
765   * Defines the 2D skew transition along the X axes.
766   *
767   * @param { number } angle - the angle of inclination along the x axis.
768   * @syscap SystemCapability.ArkUI.ArkUI.Full
769   * @atomicservice
770   * @since 11
771   */
772  skewX(angle: number): void;
773  /**
774   * Defines the 2D skew transition along the Y axes.
775   *
776   * @param { number } angle - the angle of inclination along the y axis.
777   * @syscap SystemCapability.ArkUI.ArkUI.Full
778   * @since 6
779   */
780  /**
781   * Defines the 2D skew transition along the Y axes.
782   *
783   * @param { number } angle - the angle of inclination along the y axis.
784   * @syscap SystemCapability.ArkUI.ArkUI.Full
785   * @atomicservice
786   * @since 11
787   */
788  skewY(angle: number): void;
789  /**
790   * Defines a perspective view for the 3D transformation element.
791   *
792   * @param { number } verticalDistance - the vertical distance from the observation point to the component plane.
793   * @syscap SystemCapability.ArkUI.ArkUI.Full
794   * @since 6
795   */
796  /**
797   * Defines a perspective view for the 3D transformation element.
798   *
799   * @param { number } verticalDistance - the vertical distance from the observation point to the component plane.
800   * @syscap SystemCapability.ArkUI.ArkUI.Full
801   * @atomicservice
802   * @since 11
803   */
804  perspective(verticalDistance: number): void;
805}
806
807/**
808 * AnimateOptions
809 *
810 * @interface AnimateOptions
811 * @syscap SystemCapability.ArkUI.ArkUI.Full
812 * @since 4
813 */
814/**
815 * AnimateOptions
816 *
817 * @interface AnimateOptions
818 * @syscap SystemCapability.ArkUI.ArkUI.Full
819 * @atomicservice
820 * @since 11
821 */
822export interface AnimateOptions {
823  /**
824   * Duration of the animation, in milliseconds.
825   * The default value is 0.
826   *
827   * @type { number }
828   * @syscap SystemCapability.ArkUI.ArkUI.Full
829   * @since 4
830   */
831  /**
832   * Duration of the animation, in milliseconds.
833   * The default value is 0.
834   *
835   * @type { number }
836   * @syscap SystemCapability.ArkUI.ArkUI.Full
837   * @atomicservice
838   * @since 11
839   */
840  duration: number;
841
842  /**
843   * Time curve of the animation. For details about the supported types.
844   * linear The animation speed keeps unchanged.
845   * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0).
846   * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0).
847   * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0).
848   * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0).
849   * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0).
850   * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0).
851   * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0).
852   * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0).
853   * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0).
854   * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0).
855   * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0).
856   * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0).
857   * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function.
858   * The x and y values of each input parameter must be between 0 and 1.
859   * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
860   * The default value is ease.
861   *
862   * @type { string }
863   * @syscap SystemCapability.ArkUI.ArkUI.Full
864   * @since 4
865   */
866  /**
867   * Time curve of the animation. For details about the supported types.
868   * linear The animation speed keeps unchanged.
869   * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0).
870   * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0).
871   * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0).
872   * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0).
873   * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0).
874   * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0).
875   * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0).
876   * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0).
877   * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0).
878   * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0).
879   * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0).
880   * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0).
881   * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function.
882   * The x and y values of each input parameter must be between 0 and 1.
883   * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end.
884   * The default value is ease.
885   *
886   * @type { string }
887   * @syscap SystemCapability.ArkUI.ArkUI.Full
888   * @atomicservice
889   * @since 11
890   */
891  easing: string;
892
893  /**
894   * Delay for the animation start. The default value indicates no delay.
895   * The default value is 0.
896   *
897   * @type { number }
898   * @syscap SystemCapability.ArkUI.ArkUI.Full
899   * @since 4
900   */
901  /**
902   * Delay for the animation start. The default value indicates no delay.
903   * The default value is 0.
904   *
905   * @type { number }
906   * @syscap SystemCapability.ArkUI.ArkUI.Full
907   * @atomicservice
908   * @since 11
909   */
910  delay: number;
911
912  /**
913   * Number of times the animation will be played. number indicates a fixed number of playback operations,
914   * and Infinity indicates an unlimited number of playback operations.
915   * The default value is 1.
916   *
917   * @type { number | string }
918   * @syscap SystemCapability.ArkUI.ArkUI.Full
919   * @since 4
920   */
921  /**
922   * Number of times the animation will be played. number indicates a fixed number of playback operations,
923   * and Infinity indicates an unlimited number of playback operations.
924   * The default value is 1.
925   *
926   * @type { number | string }
927   * @syscap SystemCapability.ArkUI.ArkUI.Full
928   * @atomicservice
929   * @since 11
930   */
931  iterations: number | string;
932
933  /**
934   * The animation playback mode.
935   * The default value is "normal".
936   *
937   * @type { "normal" | "reverse" | "alternate" | "alternate-reverse" }
938   * @syscap SystemCapability.ArkUI.ArkUI.Full
939   * @since 6
940   */
941  /**
942   * The animation playback mode.
943   * The default value is "normal".
944   *
945   * @type { "normal" | "reverse" | "alternate" | "alternate-reverse" }
946   * @syscap SystemCapability.ArkUI.ArkUI.Full
947   * @atomicservice
948   * @since 11
949   */
950  direction: "normal" | "reverse" | "alternate" | "alternate-reverse";
951
952  /**
953   * Whether to resume to the initial state after the animation is executed.
954   * none: The initial state is restored after the animation is executed.
955   * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed.
956   *
957   * @type { "none" | "forwards" | "backwards" | "both" }
958   * @syscap SystemCapability.ArkUI.ArkUI.Full
959   * @since 4
960   */
961  /**
962   * Whether to resume to the initial state after the animation is executed.
963   * none: The initial state is restored after the animation is executed.
964   * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed.
965   *
966   * @type { "none" | "forwards" | "backwards" | "both" }
967   * @syscap SystemCapability.ArkUI.ArkUI.Full
968   * @atomicservice
969   * @since 11
970   */
971  fill: "none" | "forwards" | "backwards" | "both";
972}
973
974/**
975 * AnimationResult
976 *
977 * @interface AnimationResult
978 * @syscap SystemCapability.ArkUI.ArkUI.Full
979 * @since 4
980 */
981/**
982 * AnimationResult
983 *
984 * @interface AnimationResult
985 * @syscap SystemCapability.ArkUI.ArkUI.Full
986 * @atomicservice
987 * @since 11
988 */
989export interface AnimationResult {
990  /**
991   * Read-only attribute, which indicates whether the animation playback is complete.
992   *
993   * @type { boolean }
994   * @syscap SystemCapability.ArkUI.ArkUI.Full
995   * @since 4
996   */
997  /**
998   * Read-only attribute, which indicates whether the animation playback is complete.
999   *
1000   * @type { boolean }
1001   * @syscap SystemCapability.ArkUI.ArkUI.Full
1002   * @atomicservice
1003   * @since 11
1004   */
1005  finished: boolean;
1006  /**
1007   * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations
1008   * (for example, start an animation with a delay).
1009   *
1010   * @type { boolean }
1011   * @syscap SystemCapability.ArkUI.ArkUI.Full
1012   * @since 4
1013   */
1014  /**
1015   * Read-only attribute, which indicates whether an animation is waiting for the completion of other asynchronous operations
1016   * (for example, start an animation with a delay).
1017   *
1018   * @type { boolean }
1019   * @syscap SystemCapability.ArkUI.ArkUI.Full
1020   * @atomicservice
1021   * @since 11
1022   */
1023  pending: boolean;
1024  /**
1025   * Animation running state:
1026   * idle: The animation is not running (playback ended or not started).
1027   * running: The animation is running.
1028   * paused: The animation is paused.
1029   * finished: Animation playback ends.
1030   *
1031   * @type { string }
1032   * @syscap SystemCapability.ArkUI.ArkUI.Full
1033   * @since 4
1034   */
1035  /**
1036   * Animation running state:
1037   * idle: The animation is not running (playback ended or not started).
1038   * running: The animation is running.
1039   * paused: The animation is paused.
1040   * finished: Animation playback ends.
1041   *
1042   * @type { string }
1043   * @syscap SystemCapability.ArkUI.ArkUI.Full
1044   * @atomicservice
1045   * @since 11
1046   */
1047  playstate: string;
1048  /**
1049   * Animation start time. This attribute is similar to that of delay in the options parameters.
1050   *
1051   * @type { number }
1052   * @syscap SystemCapability.ArkUI.ArkUI.Full
1053   * @since 4
1054   */
1055  /**
1056   * Animation start time. This attribute is similar to that of delay in the options parameters.
1057   *
1058   * @type { number }
1059   * @syscap SystemCapability.ArkUI.ArkUI.Full
1060   * @atomicservice
1061   * @since 11
1062   */
1063  startTime: number;
1064  /**
1065   * Starts the animation.
1066   *
1067   * @syscap SystemCapability.ArkUI.ArkUI.Full
1068   * @since 4
1069   */
1070  /**
1071   * Starts the animation.
1072   *
1073   * @syscap SystemCapability.ArkUI.ArkUI.Full
1074   * @atomicservice
1075   * @since 11
1076   */
1077  play(): void;
1078  /**
1079   * Ends the animation.
1080   *
1081   * @syscap SystemCapability.ArkUI.ArkUI.Full
1082   * @since 4
1083   */
1084  /**
1085   * Ends the animation.
1086   *
1087   * @syscap SystemCapability.ArkUI.ArkUI.Full
1088   * @atomicservice
1089   * @since 11
1090   */
1091  finish(): void;
1092  /**
1093   * Pauses the animation.
1094   *
1095   * @syscap SystemCapability.ArkUI.ArkUI.Full
1096   * @since 4
1097   */
1098  /**
1099   * Pauses the animation.
1100   *
1101   * @syscap SystemCapability.ArkUI.ArkUI.Full
1102   * @atomicservice
1103   * @since 11
1104   */
1105  pause(): void;
1106  /**
1107   * Cancels the animation.
1108   *
1109   * @syscap SystemCapability.ArkUI.ArkUI.Full
1110   * @since 4
1111   */
1112  /**
1113   * Cancels the animation.
1114   *
1115   * @syscap SystemCapability.ArkUI.ArkUI.Full
1116   * @atomicservice
1117   * @since 11
1118   */
1119  cancel(): void;
1120  /**
1121   * Plays the animation in reverse direction.
1122   *
1123   * @syscap SystemCapability.ArkUI.ArkUI.Full
1124   * @since 4
1125   */
1126  /**
1127   * Plays the animation in reverse direction.
1128   *
1129   * @syscap SystemCapability.ArkUI.ArkUI.Full
1130   * @atomicservice
1131   * @since 11
1132   */
1133  reverse(): void;
1134  /**
1135   * The animation is started.
1136   *
1137   * @type { function }
1138   * @syscap SystemCapability.ArkUI.ArkUI.Full
1139   * @since 4
1140   */
1141  /**
1142   * The animation is started.
1143   *
1144   * @type { function }
1145   * @syscap SystemCapability.ArkUI.ArkUI.Full
1146   * @atomicservice
1147   * @since 11
1148   */
1149  onstart: () => void;
1150  /**
1151   * The animation is finished.
1152   *
1153   * @type { function }
1154   * @syscap SystemCapability.ArkUI.ArkUI.Full
1155   * @since 4
1156   */
1157  /**
1158   * The animation is finished.
1159   *
1160   * @type { function }
1161   * @syscap SystemCapability.ArkUI.ArkUI.Full
1162   * @atomicservice
1163   * @since 11
1164   */
1165  onfinish: () => void;
1166  /**
1167   * The animation is canceled.
1168   *
1169   * @type { function }
1170   * @syscap SystemCapability.ArkUI.ArkUI.Full
1171   * @since 4
1172   */
1173  /**
1174   * The animation is canceled.
1175   *
1176   * @type { function }
1177   * @syscap SystemCapability.ArkUI.ArkUI.Full
1178   * @atomicservice
1179   * @since 11
1180   */
1181  oncancel: () => void;
1182  /**
1183   * The animation is repeated.
1184   *
1185   * @type { function }
1186   * @syscap SystemCapability.ArkUI.ArkUI.Full
1187   * @since 4
1188   */
1189  /**
1190   * The animation is repeated.
1191   *
1192   * @type { function }
1193   * @syscap SystemCapability.ArkUI.ArkUI.Full
1194   * @atomicservice
1195   * @since 11
1196   */
1197  onrepeat: () => void;
1198}
1199
1200/**
1201 * Element
1202 *
1203 * @interface Element
1204 * @syscap SystemCapability.ArkUI.ArkUI.Full
1205 * @since 4
1206 */
1207/**
1208 * Element
1209 *
1210 * @interface Element
1211 * @syscap SystemCapability.ArkUI.ArkUI.Full
1212 * @atomicservice
1213 * @since 11
1214 */
1215export interface Element {
1216  /**
1217   * Requests or cancels the focus for a component.
1218   * If focus is set to true, the focus is requested for the component.
1219   * If focus is set to false, the focus is canceled for the component.
1220   * This attribute can be defaulted to true.
1221   *
1222   * @param { FocusParamObj } [obj] - { focus: true | false }
1223   * @syscap SystemCapability.ArkUI.ArkUI.Full
1224   * @since 4
1225   */
1226  /**
1227   * Requests or cancels the focus for a component.
1228   * If focus is set to true, the focus is requested for the component.
1229   * If focus is set to false, the focus is canceled for the component.
1230   * This attribute can be defaulted to true.
1231   *
1232   * @param { FocusParamObj } [obj] - { focus: true | false }
1233   * @syscap SystemCapability.ArkUI.ArkUI.Full
1234   * @atomicservice
1235   * @since 11
1236   */
1237  focus(obj?: FocusParamObj): void;
1238
1239  /**
1240   * Requests or cancels the crown rotation focus for a component.
1241   * If focus is set to true, the crown event focus is requested.
1242   * If focus is set to false, the crown event focus is canceled.
1243   * This attribute can be defaulted to true.
1244   *
1245   * @param { FocusParamObj } [obj] - { focus: true | false }
1246   * @syscap SystemCapability.ArkUI.ArkUI.Full
1247   * @since 4
1248   */
1249  /**
1250   * Requests or cancels the crown rotation focus for a component.
1251   * If focus is set to true, the crown event focus is requested.
1252   * If focus is set to false, the crown event focus is canceled.
1253   * This attribute can be defaulted to true.
1254   *
1255   * @param { FocusParamObj } [obj] - { focus: true | false }
1256   * @syscap SystemCapability.ArkUI.ArkUI.Full
1257   * @atomicservice
1258   * @since 11
1259   */
1260  rotation(obj?: FocusParamObj): void;
1261
1262  /**
1263   * Creates and runs an animation shortcut on the component. Specify the keyframes and options required for the animation.
1264   *
1265   * @param { Array<AnimateStyle> } keyframes - keyframes is used to describe key frame parameters of the animation.
1266   * @param { AnimateOptions } options - Options. is used to describe animation parameters.
1267   * @returns { AnimationResult } This method returns the animation object.
1268   * @syscap SystemCapability.ArkUI.ArkUI.Full
1269   * @since 4
1270   */
1271  /**
1272   * Creates and runs an animation shortcut on the component. Specify the keyframes and options required for the animation.
1273   *
1274   * @param { Array<AnimateStyle> } keyframes - keyframes is used to describe key frame parameters of the animation.
1275   * @param { AnimateOptions } options - Options. is used to describe animation parameters.
1276   * @returns { AnimationResult } This method returns the animation object.
1277   * @syscap SystemCapability.ArkUI.ArkUI.Full
1278   * @atomicservice
1279   * @since 11
1280   */
1281  animate(keyframes: Array<AnimateStyle>, options: AnimateOptions): AnimationResult;
1282
1283  /**
1284   * Obtains the size and position of the element.
1285   *
1286   * @returns { RectObj } RectObj the size position of the element.
1287   * @syscap SystemCapability.ArkUI.ArkUI.Full
1288   * @since 6
1289   */
1290  /**
1291   * Obtains the size and position of the element.
1292   *
1293   * @returns { RectObj } RectObj the size position of the element.
1294   * @syscap SystemCapability.ArkUI.ArkUI.Full
1295   * @atomicservice
1296   * @since 11
1297   */
1298  getBoundingClientRect(): RectObj;
1299
1300  /**
1301   * Obtains attributes of the element.
1302   *
1303   * @returns { string } attributes of the element in json string.
1304   * @syscap SystemCapability.ArkUI.ArkUI.Full
1305   * @systemapi
1306   * @since 8
1307   */
1308  getInspector(): string;
1309
1310  /**
1311   * If 0.5 is returned, 50% of the current component is visible.
1312   *
1313   * @param { object } param - Scope of Monitoring components.
1314   * @returns { observer }
1315   * @syscap SystemCapability.ArkUI.ArkUI.Full
1316   * @since 6
1317   */
1318  /**
1319   * If 0.5 is returned, 50% of the current component is visible.
1320   *
1321   * @param { object } param - Scope of Monitoring components.
1322   * @returns { observer }
1323   * @syscap SystemCapability.ArkUI.ArkUI.Full
1324   * @atomicservice
1325   * @since 11
1326   */
1327  createIntersectionObserver(param: { ratios: Array<number> }): observer;
1328
1329  /**
1330   * Adds a node to the end of the child node list of the current node.
1331   *
1332   * @param { Element } child - Subnode object to be added
1333   * @syscap SystemCapability.ArkUI.ArkUI.Full
1334   * @since 8
1335   */
1336  /**
1337   * Adds a node to the end of the child node list of the current node.
1338   *
1339   * @param { Element } child - Subnode object to be added
1340   * @syscap SystemCapability.ArkUI.ArkUI.Full
1341   * @atomicservice
1342   * @since 11
1343   */
1344  addChild(child: Element): void;
1345
1346  /**
1347   * Sets the value of an attribute on a specified element. If the attribute already exists, update the value. Otherwise, a new attribute is added with the specified name and value.
1348   *
1349   * @param { string } name - attribute name
1350   * @param { string } value - attribute value¡¢
1351   * @syscap SystemCapability.ArkUI.ArkUI.Full
1352   * @since 8
1353   */
1354  /**
1355   * Sets the value of an attribute on a specified element. If the attribute already exists, update the value. Otherwise, a new attribute is added with the specified name and value.
1356   *
1357   * @param { string } name - attribute name
1358   * @param { string } value - attribute value¡¢
1359   * @syscap SystemCapability.ArkUI.ArkUI.Full
1360   * @atomicservice
1361   * @since 11
1362   */
1363  setAttribute(name: string, value: string): void;
1364
1365  /**
1366   * Sets a style value on a specified element. If the style exists and the style value is valid, the setting is successful. Otherwise, the setting is invalid.
1367   *
1368   * @param { string } name - style name
1369   * @param { string } value - style value
1370   * @returns { boolean } If the setting is successful, true is returned. If the setting fails, false is returned.
1371   * @syscap SystemCapability.ArkUI.ArkUI.Full
1372   * @since 8
1373   */
1374  /**
1375   * Sets a style value on a specified element. If the style exists and the style value is valid, the setting is successful. Otherwise, the setting is invalid.
1376   *
1377   * @param { string } name - style name
1378   * @param { string } value - style value
1379   * @returns { boolean } If the setting is successful, true is returned. If the setting fails, false is returned.
1380   * @syscap SystemCapability.ArkUI.ArkUI.Full
1381   * @atomicservice
1382   * @since 11
1383   */
1384  setStyle(name: string, value: string): boolean;
1385}
1386
1387/**
1388 * Defines the observer interface.
1389 *
1390 * @interface observer
1391 * @syscap SystemCapability.ArkUI.ArkUI.Full
1392 * @since 6
1393 */
1394/**
1395 * Defines the observer interface.
1396 *
1397 * @interface observer
1398 * @syscap SystemCapability.ArkUI.ArkUI.Full
1399 * @atomicservice
1400 * @since 11
1401 */
1402export interface observer {
1403  /**
1404   * Turn on the listener.
1405   *
1406   * @param { string } callback
1407   * @syscap SystemCapability.ArkUI.ArkUI.Full
1408   * @since 6
1409   */
1410  /**
1411   * Turn on the listener.
1412   *
1413   * @param { string } callback
1414   * @syscap SystemCapability.ArkUI.ArkUI.Full
1415   * @atomicservice
1416   * @since 11
1417   */
1418  observe(callback: string): void;
1419
1420  /**
1421   * Turn off the listener.
1422   *
1423   * @syscap SystemCapability.ArkUI.ArkUI.Full
1424   * @since 6
1425   */
1426  /**
1427   * Turn off the listener.
1428   *
1429   * @syscap SystemCapability.ArkUI.ArkUI.Full
1430   * @atomicservice
1431   * @since 11
1432   */
1433  unobserve(): void;
1434}
1435
1436/**
1437 * animation element
1438 *
1439 * @interface AnimationElement
1440 * @syscap SystemCapability.ArkUI.ArkUI.Full
1441 * @since 4
1442 */
1443/**
1444 * animation element
1445 *
1446 * @interface AnimationElement
1447 * @syscap SystemCapability.ArkUI.ArkUI.Full
1448 * @atomicservice
1449 * @since 11
1450 */
1451export interface AnimationElement extends Element {
1452  /**
1453   * Starts the animation.
1454   *
1455   * @syscap SystemCapability.ArkUI.ArkUI.Full
1456   * @since 4
1457   */
1458  /**
1459   * Starts the animation.
1460   *
1461   * @syscap SystemCapability.ArkUI.ArkUI.Full
1462   * @atomicservice
1463   * @since 11
1464   */
1465  play(): void;
1466  /**
1467   * Ends the animation.
1468   *
1469   * @syscap SystemCapability.ArkUI.ArkUI.Full
1470   * @since 4
1471   */
1472  /**
1473   * Ends the animation.
1474   *
1475   * @syscap SystemCapability.ArkUI.ArkUI.Full
1476   * @atomicservice
1477   * @since 11
1478   */
1479  finish(): void;
1480  /**
1481   * Pauses the animation.
1482   *
1483   * @syscap SystemCapability.ArkUI.ArkUI.Full
1484   * @since 4
1485   */
1486  /**
1487   * Pauses the animation.
1488   *
1489   * @syscap SystemCapability.ArkUI.ArkUI.Full
1490   * @atomicservice
1491   * @since 11
1492   */
1493  pause(): void;
1494  /**
1495   * Cancels the animation.
1496   *
1497   * @syscap SystemCapability.ArkUI.ArkUI.Full
1498   * @since 4
1499   */
1500  /**
1501   * Cancels the animation.
1502   *
1503   * @syscap SystemCapability.ArkUI.ArkUI.Full
1504   * @atomicservice
1505   * @since 11
1506   */
1507  cancel(): void;
1508  /**
1509   * Plays the animation in reverse direction.
1510   *
1511   * @syscap SystemCapability.ArkUI.ArkUI.Full
1512   * @since 4
1513   */
1514  /**
1515   * Plays the animation in reverse direction.
1516   *
1517   * @syscap SystemCapability.ArkUI.ArkUI.Full
1518   * @atomicservice
1519   * @since 11
1520   */
1521  reverse(): void;
1522}
1523
1524/**
1525 * ScrollParam
1526 *
1527 * @interface ScrollParam
1528 * @syscap SystemCapability.ArkUI.ArkUI.Full
1529 * @since 4
1530 */
1531/**
1532 * ScrollParam
1533 *
1534 * @interface ScrollParam
1535 * @syscap SystemCapability.ArkUI.ArkUI.Full
1536 * @atomicservice
1537 * @since 11
1538 */
1539export interface ScrollParam {
1540  /**
1541   * Offset for scrolling in the horizontal direction, in px.
1542   *
1543   * @type { ?number }
1544   * @syscap SystemCapability.ArkUI.ArkUI.Full
1545   * @since 4
1546   */
1547  /**
1548   * Offset for scrolling in the horizontal direction, in px.
1549   *
1550   * @type { ?number }
1551   * @syscap SystemCapability.ArkUI.ArkUI.Full
1552   * @atomicservice
1553   * @since 11
1554   */
1555  dx?: number;
1556
1557  /**
1558   * Offset for scrolling in the vertical direction, in px.
1559   *
1560   * @type { ?number }
1561   * @syscap SystemCapability.ArkUI.ArkUI.Full
1562   * @since 4
1563   */
1564  /**
1565   * Offset for scrolling in the vertical direction, in px.
1566   *
1567   * @type { ?number }
1568   * @syscap SystemCapability.ArkUI.ArkUI.Full
1569   * @atomicservice
1570   * @since 11
1571   */
1572  dy?: number;
1573
1574  /**
1575   * Whether a sliding animation is displayed when scroll position is changed.
1576   *
1577   * @type { ?boolean }
1578   * @syscap SystemCapability.ArkUI.ArkUI.Full
1579   * @since 4
1580   */
1581  /**
1582   * Whether a sliding animation is displayed when scroll position is changed.
1583   *
1584   * @type { ?boolean }
1585   * @syscap SystemCapability.ArkUI.ArkUI.Full
1586   * @atomicservice
1587   * @since 11
1588   */
1589  smooth?: boolean;
1590}
1591
1592/**
1593 * CurrentOffsetResultValue
1594 *
1595 * @interface CurrentOffsetResultValue
1596 * @syscap SystemCapability.ArkUI.ArkUI.Full
1597 * @since 4
1598 */
1599/**
1600 * CurrentOffsetResultValue
1601 *
1602 * @interface CurrentOffsetResultValue
1603 * @syscap SystemCapability.ArkUI.ArkUI.Full
1604 * @atomicservice
1605 * @since 11
1606 */
1607export interface CurrentOffsetResultValue {
1608  /**
1609   * Scrolling offset in the x-axis, in px.
1610   *
1611   * @type { number }
1612   * @syscap SystemCapability.ArkUI.ArkUI.Full
1613   * @since 4
1614   */
1615  /**
1616   * Scrolling offset in the x-axis, in px.
1617   *
1618   * @type { number }
1619   * @syscap SystemCapability.ArkUI.ArkUI.Full
1620   * @atomicservice
1621   * @since 11
1622   */
1623  x: number;
1624
1625  /**
1626   * Scrolling offset in the y-axis, in px.
1627   *
1628   * @type { number }
1629   * @syscap SystemCapability.ArkUI.ArkUI.Full
1630   * @since 4
1631   */
1632  /**
1633   * Scrolling offset in the y-axis, in px.
1634   *
1635   * @type { number }
1636   * @syscap SystemCapability.ArkUI.ArkUI.Full
1637   * @atomicservice
1638   * @since 11
1639   */
1640  y: number;
1641}
1642
1643/**
1644 * ListScrollToOptions
1645 *
1646 * @interface ListScrollToOptions
1647 * @syscap SystemCapability.ArkUI.ArkUI.Full
1648 * @since 4
1649 */
1650/**
1651 * ListScrollToOptions
1652 *
1653 * @interface ListScrollToOptions
1654 * @syscap SystemCapability.ArkUI.ArkUI.Full
1655 * @atomicservice
1656 * @since 11
1657 */
1658export interface ListScrollToOptions {
1659  /**
1660   * specified position.
1661   *
1662   * @type { number }
1663   * @syscap SystemCapability.ArkUI.ArkUI.Lite
1664   * @since 4
1665   */
1666  /**
1667   * specified position.
1668   *
1669   * @type { number }
1670   * @syscap SystemCapability.ArkUI.ArkUI.Lite
1671   * @atomicservice
1672   * @since 11
1673   */
1674  index: number;
1675}
1676
1677/**
1678 * The <list> component provides a list container.
1679 *
1680 * @interface ListElement
1681 * @syscap SystemCapability.ArkUI.ArkUI.Full
1682 * @since 4
1683 */
1684/**
1685 * The <list> component provides a list container.
1686 *
1687 * @interface ListElement
1688 * @syscap SystemCapability.ArkUI.ArkUI.Full
1689 * @atomicservice
1690 * @since 11
1691 */
1692export interface ListElement extends Element {
1693  /**
1694   * Scrolls the list to the position of the item at the specified index.
1695   *
1696   * @param { ListScrollToOptions } position
1697   * @syscap SystemCapability.ArkUI.ArkUI.Lite
1698   * @since 4
1699   */
1700  /**
1701   * Scrolls the list to the position of the item at the specified index.
1702   *
1703   * @param { ListScrollToOptions } position
1704   * @syscap SystemCapability.ArkUI.ArkUI.Lite
1705   * @atomicservice
1706   * @since 11
1707   */
1708  scrollTo(position: ListScrollToOptions): void;
1709
1710  /**
1711   * Scrolls the list for a certain distance.
1712   * This method applies only to smart TVs.
1713   *
1714   * @param { ScrollParam } data
1715   * @syscap SystemCapability.ArkUI.ArkUI.Full
1716   * @since 4
1717   */
1718  /**
1719   * Scrolls the list for a certain distance.
1720   * This method applies only to smart TVs.
1721   *
1722   * @param { ScrollParam } data
1723   * @syscap SystemCapability.ArkUI.ArkUI.Full
1724   * @atomicservice
1725   * @since 11
1726   */
1727  scrollBy(data: ScrollParam): void;
1728
1729  /**
1730   * If smooth is set to false (default value), the list is directly scrolled to the top.
1731   * If smooth is set to true, the list is smoothly scrolled to the top.
1732   *
1733   * @param { object } param
1734   * @syscap SystemCapability.ArkUI.ArkUI.Full
1735   * @since 4
1736   */
1737  /**
1738   * If smooth is set to false (default value), the list is directly scrolled to the top.
1739   * If smooth is set to true, the list is smoothly scrolled to the top.
1740   *
1741   * @param { object } param
1742   * @syscap SystemCapability.ArkUI.ArkUI.Full
1743   * @atomicservice
1744   * @since 11
1745   */
1746  scrollTop(param: { smooth: boolean }): void;
1747
1748  /**
1749   * If smooth is set to false (default value), the list is directly scrolled to the bottom.
1750   * If smooth is set to true, the list is smoothly scrolled to the bottom.
1751   *
1752   * @param { object } param
1753   * @syscap SystemCapability.ArkUI.ArkUI.Full
1754   * @since 4
1755   */
1756  /**
1757   * If smooth is set to false (default value), the list is directly scrolled to the bottom.
1758   * If smooth is set to true, the list is smoothly scrolled to the bottom.
1759   *
1760   * @param { object } param
1761   * @syscap SystemCapability.ArkUI.ArkUI.Full
1762   * @atomicservice
1763   * @since 11
1764   */
1765  scrollBottom(param: { smooth: boolean }): void;
1766
1767  /**
1768   * If reverse is set to false (default value), the next page is displayed. If there is no next page, the list scrolls to the bottom.
1769   * If reverse is set to true, the previous page is displayed. If there is no previous page, the list scrolls to the top.
1770   * If smooth is set to false (default value), the list is directly scrolled to another page.
1771   * If smooth is set to true, the list is smoothly scrolled to another page.
1772   *
1773   * @param { object } params
1774   * @syscap SystemCapability.ArkUI.ArkUI.Full
1775   * @since 4
1776   */
1777  /**
1778   * If reverse is set to false (default value), the next page is displayed. If there is no next page, the list scrolls to the bottom.
1779   * If reverse is set to true, the previous page is displayed. If there is no previous page, the list scrolls to the top.
1780   * If smooth is set to false (default value), the list is directly scrolled to another page.
1781   * If smooth is set to true, the list is smoothly scrolled to another page.
1782   *
1783   * @param { object } params
1784   * @syscap SystemCapability.ArkUI.ArkUI.Full
1785   * @atomicservice
1786   * @since 11
1787   */
1788  scrollPage(params: { reverse: boolean; smooth: boolean }): void;
1789
1790  /**
1791   * If reverse is set to false (default value), the list scrolls towards the bottom for a certain distance. If there is no sufficient distance, the list scrolls to the bottom.
1792   * If reverse is set to true, the list scrolls towards the top for a certain distance. If there is no sufficient distance, the list scrolls to the top.
1793   * If smooth is set to false (default value), the list is directly scrolled.
1794   * If smooth is set to true, the list is smoothly scrolled.
1795   *
1796   * @param { object } params
1797   * @syscap SystemCapability.ArkUI.ArkUI.Full
1798   * @since 4
1799   */
1800  /**
1801   * If reverse is set to false (default value), the list scrolls towards the bottom for a certain distance. If there is no sufficient distance, the list scrolls to the bottom.
1802   * If reverse is set to true, the list scrolls towards the top for a certain distance. If there is no sufficient distance, the list scrolls to the top.
1803   * If smooth is set to false (default value), the list is directly scrolled.
1804   * If smooth is set to true, the list is smoothly scrolled.
1805   *
1806   * @param { object } params
1807   * @syscap SystemCapability.ArkUI.ArkUI.Full
1808   * @atomicservice
1809   * @since 11
1810   */
1811  scrollArrow(params: { reverse: boolean; smooth: boolean }): void;
1812
1813  /**
1814   * Collapses a group.
1815   *
1816   * @param { object } param
1817   * @syscap SystemCapability.ArkUI.ArkUI.Full
1818   * @since 4
1819   */
1820  /**
1821   * Collapses a group.
1822   *
1823   * @param { object } param
1824   * @syscap SystemCapability.ArkUI.ArkUI.Full
1825   * @atomicservice
1826   * @since 11
1827   */
1828  collapseGroup(param: {
1829    /**
1830     * groupid: ID of the group to collapse.
1831     * All groups are collapsed when groupid is not specified.
1832     *
1833     * @type { string }
1834     * @syscap SystemCapability.ArkUI.ArkUI.Full
1835     * @since 4
1836     */
1837    /**
1838     * groupid: ID of the group to collapse.
1839     * All groups are collapsed when groupid is not specified.
1840     *
1841     * @type { string }
1842     * @syscap SystemCapability.ArkUI.ArkUI.Full
1843     * @atomicservice
1844     * @since 11
1845     */
1846    groupid: string;
1847  }): void;
1848
1849  /**
1850   * Expands a group.
1851   *
1852   * @param { object } param
1853   * @syscap SystemCapability.ArkUI.ArkUI.Full
1854   * @since 4
1855   */
1856  /**
1857   * Expands a group.
1858   *
1859   * @param { object } param
1860   * @syscap SystemCapability.ArkUI.ArkUI.Full
1861   * @atomicservice
1862   * @since 11
1863   */
1864  expandGroup(param: {
1865    /**
1866     * groupid: ID of the group to expand.
1867     * All groups are expanded when groupid is not specified.
1868     *
1869     * @type { string }
1870     * @syscap SystemCapability.ArkUI.ArkUI.Full
1871     * @since 4
1872     */
1873    /**
1874     * groupid: ID of the group to expand.
1875     * All groups are expanded when groupid is not specified.
1876     *
1877     * @type { string }
1878     * @syscap SystemCapability.ArkUI.ArkUI.Full
1879     * @atomicservice
1880     * @since 11
1881     */
1882    groupid: string;
1883  }): void;
1884
1885  /**
1886   * Returns the offset of the current scrolling. The return value type is Object.
1887   *
1888   * @returns { CurrentOffsetResultValue }
1889   * @syscap SystemCapability.ArkUI.ArkUI.Full
1890   * @since 4
1891   */
1892  /**
1893   * Returns the offset of the current scrolling. The return value type is Object.
1894   *
1895   * @returns { CurrentOffsetResultValue }
1896   * @syscap SystemCapability.ArkUI.ArkUI.Full
1897   * @atomicservice
1898   * @since 11
1899   */
1900  currentOffset(): CurrentOffsetResultValue;
1901}
1902
1903/**
1904 * The <swiper> component provides a swiper container.
1905 *
1906 * @interface SwiperElement
1907 * @syscap SystemCapability.ArkUI.ArkUI.Full
1908 * @since 4
1909 */
1910/**
1911 * The <swiper> component provides a swiper container.
1912 *
1913 * @interface SwiperElement
1914 * @syscap SystemCapability.ArkUI.ArkUI.Full
1915 * @atomicservice
1916 * @since 11
1917 */
1918export interface SwiperElement extends Element {
1919  /**
1920   * Scrolls the child component to the position at the specified index.
1921   *
1922   * @param { object } position
1923   * @syscap SystemCapability.ArkUI.ArkUI.Full
1924   * @since 4
1925   */
1926  /**
1927   * Scrolls the child component to the position at the specified index.
1928   *
1929   * @param { object } position
1930   * @syscap SystemCapability.ArkUI.ArkUI.Full
1931   * @atomicservice
1932   * @since 11
1933   */
1934  swipeTo(position: {
1935    /**
1936     * specified position.
1937     *
1938     * @type { number }
1939     * @syscap SystemCapability.ArkUI.ArkUI.Full
1940     * @since 4
1941     */
1942    /**
1943     * specified position.
1944     *
1945     * @type { number }
1946     * @syscap SystemCapability.ArkUI.ArkUI.Full
1947     * @atomicservice
1948     * @since 11
1949     */
1950    index: number;
1951  }): void;
1952
1953  /**
1954   * Shows the next child component.
1955   *
1956   * @syscap SystemCapability.ArkUI.ArkUI.Full
1957   * @since 4
1958   */
1959  /**
1960   * Shows the next child component.
1961   *
1962   * @syscap SystemCapability.ArkUI.ArkUI.Full
1963   * @atomicservice
1964   * @since 11
1965   */
1966  showNext(): void;
1967
1968  /**
1969   * Shows the previous child component.
1970   *
1971   * @syscap SystemCapability.ArkUI.ArkUI.Full
1972   * @since 4
1973   */
1974  /**
1975   * Shows the previous child component.
1976   *
1977   * @syscap SystemCapability.ArkUI.ArkUI.Full
1978   * @atomicservice
1979   * @since 11
1980   */
1981  showPrevious(): void;
1982}
1983
1984/**
1985 * CameraTakePhotoOptions
1986 *
1987 * @interface CameraTakePhotoOptions
1988 * @syscap SystemCapability.ArkUI.ArkUI.Full
1989 * @since 6
1990 */
1991/**
1992 * CameraTakePhotoOptions
1993 *
1994 * @interface CameraTakePhotoOptions
1995 * @syscap SystemCapability.ArkUI.ArkUI.Full
1996 * @atomicservice
1997 * @since 11
1998 */
1999export interface CameraTakePhotoOptions {
2000  /**
2001   * Picture quality.
2002   *
2003   * @type { "high" | "normal" | "low" }
2004   * @syscap SystemCapability.ArkUI.ArkUI.Full
2005   * @since 6
2006   */
2007  /**
2008   * Picture quality.
2009   *
2010   * @type { "high" | "normal" | "low" }
2011   * @syscap SystemCapability.ArkUI.ArkUI.Full
2012   * @atomicservice
2013   * @since 11
2014   */
2015  quality: "high" | "normal" | "low";
2016
2017  /**
2018   * Callback function for successful interface invocation.
2019   *
2020   * @type { ?function }
2021   * @syscap SystemCapability.ArkUI.ArkUI.Full
2022   * @since 6
2023   */
2024  /**
2025   * Callback function for successful interface invocation.
2026   *
2027   * @type { ?function }
2028   * @syscap SystemCapability.ArkUI.ArkUI.Full
2029   * @atomicservice
2030   * @since 11
2031   */
2032  success?: (result: Object) => void;
2033
2034  /**
2035   * Callback function for interface invocation failure.
2036   *
2037   * @type { ?function }
2038   * @syscap SystemCapability.ArkUI.ArkUI.Full
2039   * @since 6
2040   */
2041  /**
2042   * Callback function for interface invocation failure.
2043   *
2044   * @type { ?function }
2045   * @syscap SystemCapability.ArkUI.ArkUI.Full
2046   * @atomicservice
2047   * @since 11
2048   */
2049  fail?: (result: Object) => void;
2050
2051  /**
2052   * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully).
2053   *
2054   * @type { ?function }
2055   * @syscap SystemCapability.ArkUI.ArkUI.Full
2056   * @since 6
2057   */
2058  /**
2059   * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully).
2060   *
2061   * @type { ?function }
2062   * @syscap SystemCapability.ArkUI.ArkUI.Full
2063   * @atomicservice
2064   * @since 11
2065   */
2066  complete?: (result: Object) => void;
2067}
2068
2069/**
2070 * The <camera> component provides preview and photographing functions.
2071 *
2072 * @interface CameraElement
2073 * @syscap SystemCapability.ArkUI.ArkUI.Full
2074 * @since 6
2075 */
2076/**
2077 * The <camera> component provides preview and photographing functions.
2078 *
2079 * @interface CameraElement
2080 * @syscap SystemCapability.ArkUI.ArkUI.Full
2081 * @atomicservice
2082 * @since 11
2083 */
2084export interface CameraElement extends Element {
2085  /**
2086   * Take photos with specified parameters.
2087   *
2088   * @param { CameraTakePhotoOptions } options - the parameters of camera.
2089   * @syscap SystemCapability.ArkUI.ArkUI.Full
2090   * @since 6
2091   */
2092  /**
2093   * Take photos with specified parameters.
2094   *
2095   * @param { CameraTakePhotoOptions } options - the parameters of camera.
2096   * @syscap SystemCapability.ArkUI.ArkUI.Full
2097   * @atomicservice
2098   * @since 11
2099   */
2100  takePhoto(options: CameraTakePhotoOptions): void;
2101}
2102
2103/**
2104 * The <web> component is a container for displaying web page content.
2105 *
2106 * @interface WebElement
2107 * @syscap SystemCapability.ArkUI.ArkUI.Full
2108 * @since 6
2109 */
2110/**
2111 * The <web> component is a container for displaying web page content.
2112 *
2113 * @interface WebElement
2114 * @syscap SystemCapability.ArkUI.ArkUI.Full
2115 * @atomicservice
2116 * @since 11
2117 */
2118export interface WebElement extends Element {
2119  /**
2120   * Reload the web page content
2121   *
2122   * @syscap SystemCapability.ArkUI.ArkUI.Full
2123   * @since 6
2124   */
2125  /**
2126   * Reload the web page content
2127   *
2128   * @syscap SystemCapability.ArkUI.ArkUI.Full
2129   * @atomicservice
2130   * @since 11
2131   */
2132  reload(): void;
2133}
2134
2135/**
2136 * The <dialog> component is a custom pop-up container.
2137 *
2138 * @interface DialogElement
2139 * @syscap SystemCapability.ArkUI.ArkUI.Full
2140 * @since 4
2141 */
2142/**
2143 * The <dialog> component is a custom pop-up container.
2144 *
2145 * @interface DialogElement
2146 * @syscap SystemCapability.ArkUI.ArkUI.Full
2147 * @atomicservice
2148 * @since 11
2149 */
2150export interface DialogElement extends Element {
2151  /**
2152   * Shows a dialog box.
2153   *
2154   * @syscap SystemCapability.ArkUI.ArkUI.Full
2155   * @since 4
2156   */
2157  /**
2158   * Shows a dialog box.
2159   *
2160   * @syscap SystemCapability.ArkUI.ArkUI.Full
2161   * @atomicservice
2162   * @since 11
2163   */
2164  show(): void;
2165  /**
2166   * Closes a dialog box.
2167   *
2168   * @syscap SystemCapability.ArkUI.ArkUI.Full
2169   * @since 4
2170   */
2171  /**
2172   * Closes a dialog box.
2173   *
2174   * @syscap SystemCapability.ArkUI.ArkUI.Full
2175   * @atomicservice
2176   * @since 11
2177   */
2178  close(): void;
2179}
2180
2181/**
2182 * The <image-animator> component is used to provide an image frame animator.
2183 *
2184 * @interface ImageAnimatorElement
2185 * @syscap SystemCapability.ArkUI.ArkUI.Lite
2186 * @since 4
2187 */
2188/**
2189 * The <image-animator> component is used to provide an image frame animator.
2190 *
2191 * @interface ImageAnimatorElement
2192 * @syscap SystemCapability.ArkUI.ArkUI.Lite
2193 * @atomicservice
2194 * @since 11
2195 */
2196export interface ImageAnimatorElement extends Element {
2197  /**
2198   * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame.
2199   *
2200   * @syscap SystemCapability.ArkUI.ArkUI.Full
2201   * @since 4
2202   */
2203  /**
2204   * Starts to play the frame animation of an image. If this method is called again, the playback starts from the first frame.
2205   *
2206   * @syscap SystemCapability.ArkUI.ArkUI.Full
2207   * @atomicservice
2208   * @since 11
2209   */
2210  start(): void;
2211  /**
2212   * Pauses the frame animation playback of an image.
2213   *
2214   * @syscap SystemCapability.ArkUI.ArkUI.Full
2215   * @since 4
2216   */
2217  /**
2218   * Pauses the frame animation playback of an image.
2219   *
2220   * @syscap SystemCapability.ArkUI.ArkUI.Full
2221   * @atomicservice
2222   * @since 11
2223   */
2224  pause(): void;
2225  /**
2226   * Stops the frame animation playback of an image.
2227   *
2228   * @syscap SystemCapability.ArkUI.ArkUI.Full
2229   * @since 4
2230   */
2231  /**
2232   * Stops the frame animation playback of an image.
2233   *
2234   * @syscap SystemCapability.ArkUI.ArkUI.Full
2235   * @atomicservice
2236   * @since 11
2237   */
2238  stop(): void;
2239  /**
2240   * Resumes the frame animation playback of an image.
2241   *
2242   * @syscap SystemCapability.ArkUI.ArkUI.Full
2243   * @since 4
2244   */
2245  /**
2246   * Resumes the frame animation playback of an image.
2247   *
2248   * @syscap SystemCapability.ArkUI.ArkUI.Full
2249   * @atomicservice
2250   * @since 11
2251   */
2252  resume(): void;
2253  /**
2254   * Obtains the playback state. Available values are as follows:
2255   * Playing
2256   * Paused
2257   * Stopped
2258   *
2259   * @returns { "Playing" | "Paused" | "Stopped" }
2260   * @syscap SystemCapability.ArkUI.ArkUI.Full
2261   * @since 4
2262   */
2263  /**
2264   * Obtains the playback state. Available values are as follows:
2265   * Playing
2266   * Paused
2267   * Stopped
2268   *
2269   * @returns { "Playing" | "Paused" | "Stopped" }
2270   * @syscap SystemCapability.ArkUI.ArkUI.Full
2271   * @atomicservice
2272   * @since 11
2273   */
2274  getState(): "Playing" | "Paused" | "Stopped";
2275}
2276
2277/**
2278 * The <marquee> component inserts scrolling text, which is displayed in a single line by default.
2279 * When the text length exceeds the display area of the component, the marquee effect is displayed.
2280 *
2281 * @interface MarqueeElement
2282 * @syscap SystemCapability.ArkUI.ArkUI.Full
2283 * @since 4
2284 */
2285/**
2286 * The <marquee> component inserts scrolling text, which is displayed in a single line by default.
2287 * When the text length exceeds the display area of the component, the marquee effect is displayed.
2288 *
2289 * @interface MarqueeElement
2290 * @syscap SystemCapability.ArkUI.ArkUI.Full
2291 * @atomicservice
2292 * @since 11
2293 */
2294export interface MarqueeElement extends Element {
2295  /**
2296   * Starts scrolling.
2297   *
2298   * @syscap SystemCapability.ArkUI.ArkUI.Full
2299   * @since 4
2300   */
2301  /**
2302   * Starts scrolling.
2303   *
2304   * @syscap SystemCapability.ArkUI.ArkUI.Full
2305   * @atomicservice
2306   * @since 11
2307   */
2308  start(): void;
2309
2310  /**
2311   * Stops scrolling.
2312   *
2313   * @syscap SystemCapability.ArkUI.ArkUI.Full
2314   * @since 4
2315   */
2316  /**
2317   * Stops scrolling.
2318   *
2319   * @syscap SystemCapability.ArkUI.ArkUI.Full
2320   * @atomicservice
2321   * @since 11
2322   */
2323  stop(): void;
2324}
2325
2326/**
2327 * The <menu> component provides menus as temporary pop-up windows to display operations that can be performed by users.
2328 *
2329 * @interface MenuElement
2330 * @syscap SystemCapability.ArkUI.ArkUI.Full
2331 * @since 4
2332 */
2333/**
2334 * The <menu> component provides menus as temporary pop-up windows to display operations that can be performed by users.
2335 *
2336 * @interface MenuElement
2337 * @syscap SystemCapability.ArkUI.ArkUI.Full
2338 * @atomicservice
2339 * @since 11
2340 */
2341export interface MenuElement extends Element {
2342  /**
2343   * Displays the menu.
2344   * x and y specify the position of the displayed menu.
2345   * x indicates the X-axis coordinate from the left edge of the visible area, and does not include any scrolling offset.
2346   * y indicates the Y-axis coordinate from the upper edge of the visible area, and does not include any scrolling offset or a status bar.
2347   * The menu is preferentially displayed in the lower right corner.
2348   * When the visible space on the right is insufficient, the menu is moved leftward.
2349   * When the visible space in the lower part is insufficient, the menu is moved upward.
2350   *
2351   * @param { object } position
2352   * @syscap SystemCapability.ArkUI.ArkUI.Full
2353   * @since 4
2354   */
2355  /**
2356   * Displays the menu.
2357   * x and y specify the position of the displayed menu.
2358   * x indicates the X-axis coordinate from the left edge of the visible area, and does not include any scrolling offset.
2359   * y indicates the Y-axis coordinate from the upper edge of the visible area, and does not include any scrolling offset or a status bar.
2360   * The menu is preferentially displayed in the lower right corner.
2361   * When the visible space on the right is insufficient, the menu is moved leftward.
2362   * When the visible space in the lower part is insufficient, the menu is moved upward.
2363   *
2364   * @param { object } position
2365   * @syscap SystemCapability.ArkUI.ArkUI.Full
2366   * @atomicservice
2367   * @since 11
2368   */
2369  show(position: { x: number; y: number }): void;
2370}
2371
2372/**
2373 * The <chart> component displays line charts, gauge charts, and bar charts.
2374 *
2375 * @interface ChartElement
2376 * @syscap SystemCapability.ArkUI.ArkUI.Full
2377 * @since 4
2378 */
2379/**
2380 * The <chart> component displays line charts, gauge charts, and bar charts.
2381 *
2382 * @interface ChartElement
2383 * @syscap SystemCapability.ArkUI.ArkUI.Full
2384 * @atomicservice
2385 * @since 11
2386 */
2387export interface ChartElement extends Element {
2388  /**
2389   * Data is dynamically added to an existing data sequence.
2390   * The target sequence is specified based on serial, which is the subscript of the datasets array and starts from 0.
2391   * datasets[index].data is not updated. Only line charts support this attribute.
2392   * The value is incremented by 1 based on the horizontal coordinate and is related to the xAxis min/max setting.
2393   *
2394   * @param { object } params
2395   * @syscap SystemCapability.ArkUI.ArkUI.Full
2396   * @since 4
2397   */
2398  /**
2399   * Data is dynamically added to an existing data sequence.
2400   * The target sequence is specified based on serial, which is the subscript of the datasets array and starts from 0.
2401   * datasets[index].data is not updated. Only line charts support this attribute.
2402   * The value is incremented by 1 based on the horizontal coordinate and is related to the xAxis min/max setting.
2403   *
2404   * @param { object } params
2405   * @syscap SystemCapability.ArkUI.ArkUI.Full
2406   * @atomicservice
2407   * @since 11
2408   */
2409  append(params: {
2410    /**
2411     * Set the data subscript of the line chart to be updated.
2412     *
2413     * @type { number }
2414     * @syscap SystemCapability.ArkUI.ArkUI.Full
2415     * @since 4
2416     */
2417    /**
2418     * Set the data subscript of the line chart to be updated.
2419     *
2420     * @type { number }
2421     * @syscap SystemCapability.ArkUI.ArkUI.Full
2422     * @atomicservice
2423     * @since 11
2424     */
2425    serial: number;
2426    /**
2427     * Set the new data.
2428     *
2429     * @type { Array<number> }
2430     * @syscap SystemCapability.ArkUI.ArkUI.Full
2431     * @since 4
2432     */
2433    /**
2434     * Set the new data.
2435     *
2436     * @type { Array<number> }
2437     * @syscap SystemCapability.ArkUI.ArkUI.Full
2438     * @atomicservice
2439     * @since 11
2440     */
2441    data: Array<number>;
2442  }): void;
2443}
2444
2445/**
2446 * The <input> component provides an interactive interface to receive user input, which is displayed in a single line by default.
2447 *
2448 * @interface InputElement
2449 * @syscap SystemCapability.ArkUI.ArkUI.Full
2450 * @since 4
2451 */
2452/**
2453 * The <input> component provides an interactive interface to receive user input, which is displayed in a single line by default.
2454 *
2455 * @interface InputElement
2456 * @syscap SystemCapability.ArkUI.ArkUI.Full
2457 * @atomicservice
2458 * @since 11
2459 */
2460export interface InputElement extends Element {
2461  /**
2462   * Obtains or loses the focus of a component.
2463   * When the component type is set to text, email, date, time, number, or password, the input method can be displayed or collapsed.
2464   *
2465   * @param { object } param - If focus is not passed, the default value true is used.
2466   * @syscap SystemCapability.ArkUI.ArkUI.Full
2467   * @since 4
2468   */
2469  /**
2470   * Obtains or loses the focus of a component.
2471   * When the component type is set to text, email, date, time, number, or password, the input method can be displayed or collapsed.
2472   *
2473   * @param { object } param - If focus is not passed, the default value true is used.
2474   * @syscap SystemCapability.ArkUI.ArkUI.Full
2475   * @atomicservice
2476   * @since 11
2477   */
2478  focus(param: { focus: boolean }): void;
2479
2480  /**
2481   * Displays the error message.
2482   * This attribute is available when the component type is set to text, email, date, time, number, or password.
2483   *
2484   * @param { object } param
2485   * @syscap SystemCapability.ArkUI.ArkUI.Full
2486   * @since 4
2487   */
2488  /**
2489   * Displays the error message.
2490   * This attribute is available when the component type is set to text, email, date, time, number, or password.
2491   *
2492   * @param { object } param
2493   * @syscap SystemCapability.ArkUI.ArkUI.Full
2494   * @atomicservice
2495   * @since 11
2496   */
2497  showError(param: { error: string }): void;
2498
2499  /**
2500   * Deletes the previous character at the cursor position.
2501   *
2502   * @syscap SystemCapability.ArkUI.ArkUI.Full
2503   * @since 6
2504   */
2505  /**
2506   * Deletes the previous character at the cursor position.
2507   *
2508   * @syscap SystemCapability.ArkUI.ArkUI.Full
2509   * @atomicservice
2510   * @since 11
2511   */
2512  delete(): void;
2513}
2514
2515/**
2516 * The <button> component includes capsule, circle, text, arc, and download buttons.
2517 *
2518 * @interface ButtonElement
2519 * @syscap SystemCapability.ArkUI.ArkUI.Full
2520 * @since 4
2521 */
2522/**
2523 * The <button> component includes capsule, circle, text, arc, and download buttons.
2524 *
2525 * @interface ButtonElement
2526 * @syscap SystemCapability.ArkUI.ArkUI.Full
2527 * @atomicservice
2528 * @since 11
2529 */
2530export interface ButtonElement extends Element {
2531  /**
2532   * Progress bar of the download button.
2533   * The value ranges from 0 to 100. The progress bar is displayed if the value is greater than 0.
2534   * If the value is greater than or equal to 100, the progress bar is not displayed.
2535   * NOTE
2536   * The text displayed on the progress bar is changed based on the value.
2537   *
2538   * @param { object } param
2539   * @syscap SystemCapability.ArkUI.ArkUI.Full
2540   * @since 4
2541   */
2542  /**
2543   * Progress bar of the download button.
2544   * The value ranges from 0 to 100. The progress bar is displayed if the value is greater than 0.
2545   * If the value is greater than or equal to 100, the progress bar is not displayed.
2546   * NOTE
2547   * The text displayed on the progress bar is changed based on the value.
2548   *
2549   * @param { object } param
2550   * @syscap SystemCapability.ArkUI.ArkUI.Full
2551   * @atomicservice
2552   * @since 11
2553   */
2554  setProgress(param: { progress: number }): void;
2555}
2556
2557/**
2558 * The <textarea> component provides an interactive interface to receive user input, which is displayed in multiple lines by default.
2559 *
2560 * @interface TextAreaElement
2561 * @syscap SystemCapability.ArkUI.ArkUI.Full
2562 * @since 4
2563 */
2564/**
2565 * The <textarea> component provides an interactive interface to receive user input, which is displayed in multiple lines by default.
2566 *
2567 * @interface TextAreaElement
2568 * @syscap SystemCapability.ArkUI.ArkUI.Full
2569 * @atomicservice
2570 * @since 11
2571 */
2572export interface TextAreaElement extends Element {
2573  /**
2574   * Obtains or loses the focus of a component, which can display or collapse the input method.
2575   *
2576   * @param { object } param - If focus is not passed, the default value true is used.
2577   * @syscap SystemCapability.ArkUI.ArkUI.Full
2578   * @since 4
2579   */
2580  /**
2581   * Obtains or loses the focus of a component, which can display or collapse the input method.
2582   *
2583   * @param { object } param - If focus is not passed, the default value true is used.
2584   * @syscap SystemCapability.ArkUI.ArkUI.Full
2585   * @atomicservice
2586   * @since 11
2587   */
2588  focus(param: { focus: boolean }): void;
2589}
2590
2591/**
2592 * The <picker> component supports common, date, time, and multi-column text selectors.
2593 *
2594 * @interface PickerElement
2595 * @syscap SystemCapability.ArkUI.ArkUI.Full
2596 * @since 4
2597 */
2598/**
2599 * The <picker> component supports common, date, time, and multi-column text selectors.
2600 *
2601 * @interface PickerElement
2602 * @syscap SystemCapability.ArkUI.ArkUI.Full
2603 * @atomicservice
2604 * @since 11
2605 */
2606export interface PickerElement extends Element {
2607  /**
2608   * Displays the picker.
2609   *
2610   * @syscap SystemCapability.ArkUI.ArkUI.Full
2611   * @since 4
2612   */
2613  /**
2614   * Displays the picker.
2615   *
2616   * @syscap SystemCapability.ArkUI.ArkUI.Full
2617   * @atomicservice
2618   * @since 11
2619   */
2620  show(): void;
2621}
2622
2623/**
2624 * The <video> component provides a video player.
2625 *
2626 * @interface VideoElement
2627 * @syscap SystemCapability.ArkUI.ArkUI.Full
2628 * @since 4
2629 */
2630/**
2631 * The <video> component provides a video player.
2632 *
2633 * @interface VideoElement
2634 * @syscap SystemCapability.ArkUI.ArkUI.Full
2635 * @atomicservice
2636 * @since 11
2637 */
2638export interface VideoElement extends Element {
2639  /**
2640   * Requests to start playing a video.
2641   *
2642   * @syscap SystemCapability.ArkUI.ArkUI.Full
2643   * @since 4
2644   */
2645  /**
2646   * Requests to start playing a video.
2647   *
2648   * @syscap SystemCapability.ArkUI.ArkUI.Full
2649   * @atomicservice
2650   * @since 11
2651   */
2652  start(): void;
2653
2654  /**
2655   * Requests to pause a video.
2656   *
2657   * @syscap SystemCapability.ArkUI.ArkUI.Full
2658   * @since 4
2659   */
2660  /**
2661   * Requests to pause a video.
2662   *
2663   * @syscap SystemCapability.ArkUI.ArkUI.Full
2664   * @atomicservice
2665   * @since 11
2666   */
2667  pause(): void;
2668
2669  /**
2670   * Specifies the video playing position.
2671   *
2672   * @param { object } param
2673   * @syscap SystemCapability.ArkUI.ArkUI.Full
2674   * @since 4
2675   */
2676  /**
2677   * Specifies the video playing position.
2678   *
2679   * @param { object } param
2680   * @syscap SystemCapability.ArkUI.ArkUI.Full
2681   * @atomicservice
2682   * @since 11
2683   */
2684  setCurrentTime(param: { currenttime: number }): void;
2685
2686  /**
2687   * Requests to enter the full screen mode.
2688   *
2689   * @param { object } param
2690   * @syscap SystemCapability.ArkUI.ArkUI.Full
2691   * @since 4
2692   */
2693  /**
2694   * Requests to enter the full screen mode.
2695   *
2696   * @param { object } param
2697   * @syscap SystemCapability.ArkUI.ArkUI.Full
2698   * @atomicservice
2699   * @since 11
2700   */
2701  requestFullscreen(param: { screenOrientation: "default" }): void;
2702
2703  /**
2704   * Requests to exit the full screen mode.
2705   *
2706   * @syscap SystemCapability.ArkUI.ArkUI.Full
2707   * @since 4
2708   */
2709  /**
2710   * Requests to exit the full screen mode.
2711   *
2712   * @syscap SystemCapability.ArkUI.ArkUI.Full
2713   * @atomicservice
2714   * @since 11
2715   */
2716  exitFullscreen(): void;
2717
2718  /**
2719   * Requests to stop playing a video.
2720   *
2721   * @syscap SystemCapability.ArkUI.ArkUI.Full
2722   * @since 6
2723   */
2724  /**
2725   * Requests to stop playing a video.
2726   *
2727   * @syscap SystemCapability.ArkUI.ArkUI.Full
2728   * @atomicservice
2729   * @since 11
2730   */
2731  stop(): void;
2732}
2733
2734/**
2735 * TextMetrics
2736 *
2737 * @interface TextMetrics
2738 * @syscap SystemCapability.ArkUI.ArkUI.Full
2739 * @since 4
2740 */
2741/**
2742 * TextMetrics
2743 *
2744 * @interface TextMetrics
2745 * @syscap SystemCapability.ArkUI.ArkUI.Full
2746 * @atomicservice
2747 * @since 11
2748 */
2749export interface TextMetrics {
2750  /**
2751   * @type { number }
2752   * @syscap SystemCapability.ArkUI.ArkUI.Full
2753   * @since 4
2754   */
2755  /**
2756   * @type { number }
2757   * @syscap SystemCapability.ArkUI.ArkUI.Full
2758   * @atomicservice
2759   * @since 11
2760   */
2761  width: number;
2762  /**
2763   * @type { number }
2764   * @syscap SystemCapability.ArkUI.ArkUI.Full
2765   * @since 8
2766   */
2767  /**
2768   * @type { number }
2769   * @syscap SystemCapability.ArkUI.ArkUI.Full
2770   * @atomicservice
2771   * @since 11
2772   */
2773  height: number;
2774}
2775
2776/**
2777 * Provides a 2D rendering context for the drawing surface of the < Canvas > element.
2778 * It is used to draw shapes, text, images and other objects.
2779 *
2780 * @interface OffscreenCanvasRenderingContext2D
2781 * @syscap SystemCapability.ArkUI.ArkUI.Full
2782 * @since 7
2783 */
2784/**
2785 * Provides a 2D rendering context for the drawing surface of the < Canvas > element.
2786 * It is used to draw shapes, text, images and other objects.
2787 *
2788 * @interface OffscreenCanvasRenderingContext2D
2789 * @syscap SystemCapability.ArkUI.ArkUI.Full
2790 * @atomicservice
2791 * @since 11
2792 */
2793export interface OffscreenCanvasRenderingContext2D {
2794  /**
2795   * Gets the dotted spacing of a line.
2796   * Returns the current line segment style array containing an even number of non-negative numbers.
2797   *
2798   * @syscap SystemCapability.ArkUI.ArkUI.Full
2799   * @since 7
2800   */
2801  /**
2802   * Gets the dotted spacing of a line.
2803   * Returns the current line segment style array containing an even number of non-negative numbers.
2804   *
2805   * @syscap SystemCapability.ArkUI.ArkUI.Full
2806   * @atomicservice
2807   * @since 11
2808   */
2809  getLineDash: Array<number>;
2810
2811  /**
2812   * Fill style attribute.
2813   * Paint color used to fill the area.
2814   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
2815   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
2816   *
2817   * @type { ?(string | CanvasGradient | CanvasPattern) }
2818   * @syscap SystemCapability.ArkUI.ArkUI.Full
2819   * @since 7
2820   */
2821  /**
2822   * Fill style attribute.
2823   * Paint color used to fill the area.
2824   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
2825   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
2826   *
2827   * @type { ?(string | CanvasGradient | CanvasPattern) }
2828   * @syscap SystemCapability.ArkUI.ArkUI.Full
2829   * @atomicservice
2830   * @since 11
2831   */
2832  fillStyle?: string | CanvasGradient | CanvasPattern;
2833
2834  /**
2835   * Sets the stroke paint style.
2836   * Color of the stroke paint.
2837   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
2838   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
2839   *
2840   * @type { ?(string | CanvasGradient | CanvasPattern) }
2841   * @syscap SystemCapability.ArkUI.ArkUI.Full
2842   * @since 7
2843   */
2844  /**
2845   * Sets the stroke paint style.
2846   * Color of the stroke paint.
2847   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
2848   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
2849   *
2850   * @type { ?(string | CanvasGradient | CanvasPattern) }
2851   * @syscap SystemCapability.ArkUI.ArkUI.Full
2852   * @atomicservice
2853   * @since 11
2854   */
2855  strokeStyle?: string | CanvasGradient | CanvasPattern;
2856
2857  /**
2858   * Sets the dotted spacing of a line.
2859   *
2860   * @param { Array<number> } segments - A set of numbers describing the length of alternating drawn line segments and spacing (coordinate space units).
2861   * @syscap SystemCapability.ArkUI.ArkUI.Full
2862   * @since 7
2863   */
2864  /**
2865   * Sets the dotted spacing of a line.
2866   *
2867   * @param { Array<number> } segments - A set of numbers describing the length of alternating drawn line segments and spacing (coordinate space units).
2868   * @syscap SystemCapability.ArkUI.ArkUI.Full
2869   * @atomicservice
2870   * @since 11
2871   */
2872  setLineDash(segments: Array<number>): void;
2873
2874  /**
2875   * Draw an Image object.
2876   *
2877   * @param { Image } image - An element drawn to the context.
2878   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2879   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2880   * @param { number } dw - Image The width drawn on the target canvas.
2881   * @param { number } dh - Image The height drawn on the target canvas.
2882   * @syscap SystemCapability.ArkUI.ArkUI.Full
2883   * @since 7
2884   */
2885  /**
2886   * Draw an Image object.
2887   *
2888   * @param { Image } image - An element drawn to the context.
2889   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2890   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2891   * @param { number } dw - Image The width drawn on the target canvas.
2892   * @param { number } dh - Image The height drawn on the target canvas.
2893   * @syscap SystemCapability.ArkUI.ArkUI.Full
2894   * @atomicservice
2895   * @since 11
2896   */
2897  drawImage(image: Image, dx: number, dy: number, dw: number, dh: number): void;
2898
2899  /**
2900   * Draw an Image object.
2901   *
2902   * @param { Image } image - An element drawn to the context.
2903   * @param { number } sx - The upper-left X-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2904   * @param { number } sy - The upper-left Y-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2905   * @param { number } sw - The width of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2906   * @param { number } sh - The height of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2907   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2908   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2909   * @param { number } dw - Image The width drawn on the target canvas.
2910   * @param { number } dh - Image The height drawn on the target canvas.
2911   * @syscap SystemCapability.ArkUI.ArkUI.Full
2912   * @since 7
2913   */
2914  /**
2915   * Draw an Image object.
2916   *
2917   * @param { Image } image - An element drawn to the context.
2918   * @param { number } sx - The upper-left X-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2919   * @param { number } sy - The upper-left Y-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2920   * @param { number } sw - The width of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2921   * @param { number } sh - The height of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2922   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2923   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2924   * @param { number } dw - Image The width drawn on the target canvas.
2925   * @param { number } dh - Image The height drawn on the target canvas.
2926   * @syscap SystemCapability.ArkUI.ArkUI.Full
2927   * @atomicservice
2928   * @since 11
2929   */
2930  drawImage(
2931    image: Image,
2932    sx: number,
2933    sy: number,
2934    sw: number,
2935    sh: number,
2936    dx: number,
2937    dy: number,
2938    dw: number,
2939    dh: number,
2940  ): void;
2941
2942  /**
2943   * Draw an Image object.
2944   *
2945   * @param { image.PixelMap } image - An element drawn to the context.
2946   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2947   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2948   * @param { number } dw - Image The width drawn on the target canvas.
2949   * @param { number } dh - Image The height drawn on the target canvas.
2950   * @syscap SystemCapability.ArkUI.ArkUI.Full
2951   * @since 9
2952   */
2953  /**
2954   * Draw an Image object.
2955   *
2956   * @param { image.PixelMap } image - An element drawn to the context.
2957   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2958   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2959   * @param { number } dw - Image The width drawn on the target canvas.
2960   * @param { number } dh - Image The height drawn on the target canvas.
2961   * @syscap SystemCapability.ArkUI.ArkUI.Full
2962   * @atomicservice
2963   * @since 11
2964   */
2965  drawImage(image: image.PixelMap, dx: number, dy: number, dw: number, dh: number): void;
2966
2967  /**
2968   * Draw an Image object.
2969   *
2970   * @param { image.PixelMap } image - An element drawn to the context.
2971   * @param { number } sx - The upper-left X-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2972   * @param { number } sy - The upper-left Y-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2973   * @param { number } sw - The width of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2974   * @param { number } sh - The height of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2975   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2976   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2977   * @param { number } dw - Image The width drawn on the target canvas.
2978   * @param { number } dh - Image The height drawn on the target canvas.
2979   * @syscap SystemCapability.ArkUI.ArkUI.Full
2980   * @since 9
2981   */
2982  /**
2983   * Draw an Image object.
2984   *
2985   * @param { image.PixelMap } image - An element drawn to the context.
2986   * @param { number } sx - The upper-left X-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2987   * @param { number } sy - The upper-left Y-axis coordinates of the image's rectangular (clipped) selection box that need to be drawn into the target context.
2988   * @param { number } sw - The width of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2989   * @param { number } sh - The height of the image's rectangular (clipped) selection box that needs to be drawn into the target context.
2990   * @param { number } dx - The top left corner of the image is the X-axis coordinates on the target canvas.
2991   * @param { number } dy - The top left corner of the image is the Y-axis coordinates on the target canvas.
2992   * @param { number } dw - Image The width drawn on the target canvas.
2993   * @param { number } dh - Image The height drawn on the target canvas.
2994   * @syscap SystemCapability.ArkUI.ArkUI.Full
2995   * @atomicservice
2996   * @since 11
2997   */
2998  drawImage(
2999    image: image.PixelMap,
3000    sx: number,
3001    sy: number,
3002    sw: number,
3003    sh: number,
3004    dx: number,
3005    dy: number,
3006    dw: number,
3007    dh: number,
3008  ): void;
3009
3010  /**
3011   * Creates a drawing path.
3012   *
3013   * @syscap SystemCapability.ArkUI.ArkUI.Full
3014   * @since 7
3015   */
3016  /**
3017   * Creates a drawing path.
3018   *
3019   * @syscap SystemCapability.ArkUI.ArkUI.Full
3020   * @atomicservice
3021   * @since 11
3022   */
3023  beginPath(): void;
3024
3025  /**
3026   * Crop the current canvas.
3027   *
3028   * @syscap SystemCapability.ArkUI.ArkUI.Full
3029   * @since 7
3030   */
3031  /**
3032   * Crop the current canvas.
3033   *
3034   * @syscap SystemCapability.ArkUI.ArkUI.Full
3035   * @atomicservice
3036   * @since 11
3037   */
3038  clip(): void;
3039
3040  /**
3041   * Fills the current canvas with color.
3042   *
3043   * @syscap SystemCapability.ArkUI.ArkUI.Full
3044   * @since 7
3045   */
3046  /**
3047   * Fills the current canvas with color.
3048   *
3049   * @syscap SystemCapability.ArkUI.ArkUI.Full
3050   * @atomicservice
3051   * @since 11
3052   */
3053  fill(): void;
3054
3055  /**
3056   * Check whether the specified coordinate point is on the Path.
3057   *
3058   * @param { number } x - The X coordinate of the detection point.
3059   * @param { number } y - The Y coordinate of the detection point.
3060   * @returns { boolean } boolean Return true if the detection point is contained within the current or specified path Otherwise return false.
3061   * @syscap SystemCapability.ArkUI.ArkUI.Full
3062   * @since 7
3063   */
3064  /**
3065   * Check whether the specified coordinate point is on the Path.
3066   *
3067   * @param { number } x - The X coordinate of the detection point.
3068   * @param { number } y - The Y coordinate of the detection point.
3069   * @returns { boolean } boolean Return true if the detection point is contained within the current or specified path Otherwise return false.
3070   * @syscap SystemCapability.ArkUI.ArkUI.Full
3071   * @atomicservice
3072   * @since 11
3073   */
3074  isPointInPath(x: number, y: number): boolean;
3075
3076  /**
3077   * Check whether the specified coordinate point is on the Path.
3078   *
3079   * @param { Path2D } path - The Path2D path that needs to be populated.
3080   * @param { number } x - The X coordinate of the detection point.
3081   * @param { number } y - The Y coordinate of the detection point.
3082   * @returns { boolean } boolean Return true if the detection point is contained within the current or specified path Otherwise return false.
3083   * @syscap SystemCapability.ArkUI.ArkUI.Full
3084   * @since 7
3085   */
3086  /**
3087   * Check whether the specified coordinate point is on the Path.
3088   *
3089   * @param { Path2D } path - The Path2D path that needs to be populated.
3090   * @param { number } x - The X coordinate of the detection point.
3091   * @param { number } y - The Y coordinate of the detection point.
3092   * @returns { boolean } boolean Return true if the detection point is contained within the current or specified path Otherwise return false.
3093   * @syscap SystemCapability.ArkUI.ArkUI.Full
3094   * @atomicservice
3095   * @since 11
3096   */
3097  isPointInPath(path: Path2D, x: number, y: number): boolean;
3098
3099  /**
3100   * Checks whether the specified coordinate point is on the stroke edge.
3101   *
3102   * @param { number } x - The X coordinate of the detection point.
3103   * @param { number } y - The Y coordinate of the detection point.
3104   * @returns { boolean } boolean A Boolean value that returns true when the point is on the line of the path, false otherwise.
3105   * @syscap SystemCapability.ArkUI.ArkUI.Full
3106   * @since 7
3107   */
3108  /**
3109   * Checks whether the specified coordinate point is on the stroke edge.
3110   *
3111   * @param { number } x - The X coordinate of the detection point.
3112   * @param { number } y - The Y coordinate of the detection point.
3113   * @returns { boolean } boolean A Boolean value that returns true when the point is on the line of the path, false otherwise.
3114   * @syscap SystemCapability.ArkUI.ArkUI.Full
3115   * @atomicservice
3116   * @since 11
3117   */
3118  isPointInStroke(x: number, y: number): boolean;
3119
3120  /**
3121   * Checks whether the specified coordinate point is on the stroke edge.
3122   *
3123   * @param { Path2D } path - Path2D path.
3124   * @param { number } x - The X coordinate of the detection point.
3125   * @param { number } y - The Y coordinate of the detection point.
3126   * @returns { boolean } boolean A Boolean value that returns true when the point is on the line of the path, false otherwise.
3127   * @syscap SystemCapability.ArkUI.ArkUI.Full
3128   * @since 7
3129   */
3130  /**
3131   * Checks whether the specified coordinate point is on the stroke edge.
3132   *
3133   * @param { Path2D } path - Path2D path.
3134   * @param { number } x - The X coordinate of the detection point.
3135   * @param { number } y - The Y coordinate of the detection point.
3136   * @returns { boolean } boolean A Boolean value that returns true when the point is on the line of the path, false otherwise.
3137   * @syscap SystemCapability.ArkUI.ArkUI.Full
3138   * @atomicservice
3139   * @since 11
3140   */
3141  isPointInStroke(path: Path2D, x: number, y: number): boolean;
3142
3143  /**
3144   * Stroke draws the current path.
3145   *
3146   * @syscap SystemCapability.ArkUI.ArkUI.Full
3147   * @since 7
3148   */
3149  /**
3150   * Stroke draws the current path.
3151   *
3152   * @syscap SystemCapability.ArkUI.ArkUI.Full
3153   * @atomicservice
3154   * @since 11
3155   */
3156  stroke(): void;
3157
3158  /**
3159   * Stroke draws the current path.
3160   *
3161   * @param { Path2D } path - The object of Path2D.
3162   * @syscap SystemCapability.ArkUI.ArkUI.Full
3163   * @since 7
3164   */
3165  /**
3166   * Stroke draws the current path.
3167   *
3168   * @param { Path2D } path - The object of Path2D.
3169   * @syscap SystemCapability.ArkUI.ArkUI.Full
3170   * @atomicservice
3171   * @since 11
3172   */
3173  stroke(path: Path2D): void;
3174
3175  /**
3176   * Create a radial tween object.
3177   *
3178   * @param { number } x0 - The x coordinate of the circle at the beginning.
3179   * @param { number } y0 - The y coordinate of the circle at the beginning.
3180   * @param { number } r0 - The radius of the starting circle.
3181   * @param { number } x1 - X-coordinate of the end point.
3182   * @param { number } y1 - Y-coordinate of the end point.
3183   * @param { number } r1 - The radius of End Circle.
3184   * @returns { CanvasGradient } RadialGradient object.
3185   * @syscap SystemCapability.ArkUI.ArkUI.Full
3186   * @since 7
3187   */
3188  /**
3189   * Create a radial tween object.
3190   *
3191   * @param { number } x0 - The x coordinate of the circle at the beginning.
3192   * @param { number } y0 - The y coordinate of the circle at the beginning.
3193   * @param { number } r0 - The radius of the starting circle.
3194   * @param { number } x1 - X-coordinate of the end point.
3195   * @param { number } y1 - Y-coordinate of the end point.
3196   * @param { number } r1 - The radius of End Circle.
3197   * @returns { CanvasGradient } RadialGradient object.
3198   * @syscap SystemCapability.ArkUI.ArkUI.Full
3199   * @atomicservice
3200   * @since 11
3201   */
3202  createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
3203
3204  /**
3205   * Create a drawing style template.
3206   *
3207   * @param { Image } image - The CanvasImageSource object that is the source of the duplicate image.
3208   * @param { string } repetition - Specify how to repeat images.
3209   * @returns { CanvasPattern } CanvasPattern An opaque object that describes a schema.
3210   * @syscap SystemCapability.ArkUI.ArkUI.Full
3211   * @since 7
3212   */
3213  /**
3214   * Create a drawing style template.
3215   *
3216   * @param { Image } image - The CanvasImageSource object that is the source of the duplicate image.
3217   * @param { string } repetition - Specify how to repeat images.
3218   * @returns { CanvasPattern } CanvasPattern An opaque object that describes a schema.
3219   * @syscap SystemCapability.ArkUI.ArkUI.Full
3220   * @atomicservice
3221   * @since 11
3222   */
3223  createPattern(image: Image, repetition: string): CanvasPattern;
3224
3225  /**
3226   * Creates a linear gradient color.
3227   *
3228   * @param { number } x0 - X-coordinate of the start point.
3229   * @param { number } y0 - Y-coordinate of the start point.
3230   * @param { number } x1 - X-coordinate of the end point.
3231   * @param { number } y1 - Y-coordinate of the end point.
3232   * @returns { CanvasGradient } LinearGradient object.
3233   * @syscap SystemCapability.ArkUI.ArkUI.Full
3234   * @since 7
3235   */
3236  /**
3237   * Creates a linear gradient color.
3238   *
3239   * @param { number } x0 - X-coordinate of the start point.
3240   * @param { number } y0 - Y-coordinate of the start point.
3241   * @param { number } x1 - X-coordinate of the end point.
3242   * @param { number } y1 - Y-coordinate of the end point.
3243   * @returns { CanvasGradient } LinearGradient object.
3244   * @syscap SystemCapability.ArkUI.ArkUI.Full
3245   * @atomicservice
3246   * @since 11
3247   */
3248  createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
3249
3250  /**
3251   * Create an ImageData object.
3252   *
3253   * @param { number } sw - The width of the new object.
3254   * @param { number } sh - The height of the new object.
3255   * @returns { ImageData } ImageData New ImageData object with width and height specified.
3256   * @syscap SystemCapability.ArkUI.ArkUI.Full
3257   * @since 7
3258   */
3259  /**
3260   * Create an ImageData object.
3261   *
3262   * @param { number } sw - The width of the new object.
3263   * @param { number } sh - The height of the new object.
3264   * @returns { ImageData } ImageData New ImageData object with width and height specified.
3265   * @syscap SystemCapability.ArkUI.ArkUI.Full
3266   * @atomicservice
3267   * @since 11
3268   */
3269  createImageData(sw: number, sh: number): ImageData;
3270
3271  /**
3272   * Create an ImageData object.
3273   *
3274   * @param { ImageData } imagedata - Copy an object of the same width and height from an existing ImageData object
3275   * The image itself is not allowed to be copied.
3276   * @returns { ImageData } ImageData New ImageData object with width and height specified.
3277   * @syscap SystemCapability.ArkUI.ArkUI.Full
3278   * @since 7
3279   */
3280  /**
3281   * Create an ImageData object.
3282   *
3283   * @param { ImageData } imagedata - Copy an object of the same width and height from an existing ImageData object
3284   * The image itself is not allowed to be copied.
3285   * @returns { ImageData } ImageData New ImageData object with width and height specified.
3286   * @syscap SystemCapability.ArkUI.ArkUI.Full
3287   * @atomicservice
3288   * @since 11
3289   */
3290  createImageData(imagedata: ImageData): ImageData;
3291
3292  /**
3293   * Creates a path that is later used by the CanvasRenderingContext2D object.
3294   *
3295   * @param { Path2D } [path] - another created Path2D object.
3296   * @returns { Path2D } the object of Path2D.
3297   * @syscap SystemCapability.ArkUI.ArkUI.Full
3298   * @since 7
3299   */
3300  /**
3301   * Creates a path that is later used by the CanvasRenderingContext2D object.
3302   *
3303   * @param { Path2D } [path] - another created Path2D object.
3304   * @returns { Path2D } the object of Path2D.
3305   * @syscap SystemCapability.ArkUI.ArkUI.Full
3306   * @atomicservice
3307   * @since 11
3308   */
3309  createPath2D(path?: Path2D): Path2D;
3310
3311  /**
3312   * Creates a path that is later used by the CanvasRenderingContext2D object.
3313   *
3314   * @param { string } [cmds] - a string defined using the SVG path command.
3315   * @returns { Path2D } the object of Path2D.
3316   * @syscap SystemCapability.ArkUI.ArkUI.Full
3317   * @since 7
3318   */
3319  /**
3320   * Creates a path that is later used by the CanvasRenderingContext2D object.
3321   *
3322   * @param { string } [cmds] - a string defined using the SVG path command.
3323   * @returns { Path2D } the object of Path2D.
3324   * @syscap SystemCapability.ArkUI.ArkUI.Full
3325   * @atomicservice
3326   * @since 11
3327   */
3328  createPath2D(cmds?: string): Path2D;
3329
3330  /**
3331   * Get an ImageData object.
3332   *
3333   * @param { number } sx - The upper-left x-coordinate of the rectangular area of the image data to be extracted.
3334   * @param { number } sy - The upper-left y coordinate of the rectangular region of the image data to be extracted.
3335   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3336   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3337   * @returns { ImageData } ImageData An ImageData object that contains the rectangular ImageData given by the canvas.
3338   * @syscap SystemCapability.ArkUI.ArkUI.Full
3339   * @since 7
3340   */
3341  /**
3342   * Get an ImageData object.
3343   *
3344   * @param { number } sx - The upper-left x-coordinate of the rectangular area of the image data to be extracted.
3345   * @param { number } sy - The upper-left y coordinate of the rectangular region of the image data to be extracted.
3346   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3347   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3348   * @returns { ImageData } ImageData An ImageData object that contains the rectangular ImageData given by the canvas.
3349   * @syscap SystemCapability.ArkUI.ArkUI.Full
3350   * @atomicservice
3351   * @since 11
3352   */
3353  getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
3354
3355  /**
3356   * Get an PixelMap object.
3357   *
3358   * @param { number } sx - The upper-left x-coordinate of the rectangular area of the image data to be extracted.
3359   * @param { number } sy - The upper-left y coordinate of the rectangular region of the image data to be extracted.
3360   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3361   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3362   * @returns { image.PixelMap } PixelMap A PixelMap object that contains the rectangular ImageData given by the canvas.
3363   * @syscap SystemCapability.ArkUI.ArkUI.Full
3364   * @since 9
3365   */
3366  /**
3367   * Get an PixelMap object.
3368   *
3369   * @param { number } sx - The upper-left x-coordinate of the rectangular area of the image data to be extracted.
3370   * @param { number } sy - The upper-left y coordinate of the rectangular region of the image data to be extracted.
3371   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3372   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3373   * @returns { image.PixelMap } PixelMap A PixelMap object that contains the rectangular ImageData given by the canvas.
3374   * @syscap SystemCapability.ArkUI.ArkUI.Full
3375   * @atomicservice
3376   * @since 11
3377   */
3378  getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap
3379
3380  /**
3381   * Draws the specified ImageData object to the canvas.
3382   *
3383   * @param { ImageData } imagedata - An array object containing pixel values.
3384   * @param { number } dx - The offset of the position of the source image data in the target canvas (the offset in the X-axis direction).
3385   * @param { number } dy - The offset of the position of the source image data in the target canvas (the Y-axis offset).
3386   * @syscap SystemCapability.ArkUI.ArkUI.Full
3387   * @since 7
3388   */
3389  /**
3390   * Draws the specified ImageData object to the canvas.
3391   *
3392   * @param { ImageData } imagedata - An array object containing pixel values.
3393   * @param { number } dx - The offset of the position of the source image data in the target canvas (the offset in the X-axis direction).
3394   * @param { number } dy - The offset of the position of the source image data in the target canvas (the Y-axis offset).
3395   * @syscap SystemCapability.ArkUI.ArkUI.Full
3396   * @atomicservice
3397   * @since 11
3398   */
3399  putImageData(imagedata: ImageData, dx: number, dy: number): void;
3400
3401  /**
3402   * Draws the specified ImageData object to the canvas.
3403   *
3404   * @param { ImageData } imagedata - An array object containing pixel values.
3405   * @param { number } dx - The offset of the position of the source image data in the target canvas (the offset in the X-axis direction).
3406   * @param { number } dy - he offset of the position of the source image data in the target canvas (the Y-axis offset).
3407   * @param { number } dirtyX - In the source image data,
3408   * the position of the upper left corner of the rectangular region Default is the upper left corner of the entire image data (x coordinate).
3409   * @param { number } dirtyY - In the source image data,
3410   * the position of the upper left corner of the rectangular region Default is the top left corner (y coordinate) of the entire image data.
3411   * @param { number } dirtyWidth - In the source image data, the width of a rectangular region. Default is the width of the image data.
3412   * @param { number } dirtyHeight - In the source image data, the height of a rectangular region. Default is the height of the image data.
3413   * @syscap SystemCapability.ArkUI.ArkUI.Full
3414   * @since 7
3415   */
3416  /**
3417   * Draws the specified ImageData object to the canvas.
3418   *
3419   * @param { ImageData } imagedata - An array object containing pixel values.
3420   * @param { number } dx - The offset of the position of the source image data in the target canvas (the offset in the X-axis direction).
3421   * @param { number } dy - he offset of the position of the source image data in the target canvas (the Y-axis offset).
3422   * @param { number } dirtyX - In the source image data,
3423   * the position of the upper left corner of the rectangular region Default is the upper left corner of the entire image data (x coordinate).
3424   * @param { number } dirtyY - In the source image data,
3425   * the position of the upper left corner of the rectangular region Default is the top left corner (y coordinate) of the entire image data.
3426   * @param { number } dirtyWidth - In the source image data, the width of a rectangular region. Default is the width of the image data.
3427   * @param { number } dirtyHeight - In the source image data, the height of a rectangular region. Default is the height of the image data.
3428   * @syscap SystemCapability.ArkUI.ArkUI.Full
3429   * @atomicservice
3430   * @since 11
3431   */
3432  putImageData(
3433    imagedata: ImageData,
3434    dx: number,
3435    dy: number,
3436    dirtyX: number,
3437    dirtyY: number,
3438    dirtyWidth: number,
3439    dirtyHeight: number,
3440  ): void;
3441
3442  /**
3443   * Draw an arc.
3444   *
3445   * @param { number } radius - Radius of an arc.
3446   * @param { number } x - The X-axis coordinates of the center of the circle.
3447   * @param { number } y - The Y-axis coordinates of the center of an arc (center of a circle).
3448   * @param { number } startAngle - The starting point of the arc, in the X-axis direction, is calculated in radians.
3449   * @param { number } endAngle - The end point of an arc, expressed in radians.
3450   * @param { boolean } [anticlockwise] - An optional Boolean value. If true, the arc is drawn counterclockwise, and otherwise clockwise.
3451   * @syscap SystemCapability.ArkUI.ArkUI.Full
3452   * @since 7
3453   */
3454  /**
3455   * Draw an arc.
3456   *
3457   * @param { number } radius - Radius of an arc.
3458   * @param { number } x - The X-axis coordinates of the center of the circle.
3459   * @param { number } y - The Y-axis coordinates of the center of an arc (center of a circle).
3460   * @param { number } startAngle - The starting point of the arc, in the X-axis direction, is calculated in radians.
3461   * @param { number } endAngle - The end point of an arc, expressed in radians.
3462   * @param { boolean } [anticlockwise] - An optional Boolean value. If true, the arc is drawn counterclockwise, and otherwise clockwise.
3463   * @syscap SystemCapability.ArkUI.ArkUI.Full
3464   * @atomicservice
3465   * @since 11
3466   */
3467  arc(radius: number, x: number, y: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
3468
3469  /**
3470   * Draws an arc from the beginning to the end.
3471   *
3472   * @param { number } x1 - The X-axis coordinates of the first control point.
3473   * @param { number } x2 - The X-axis coordinates of the second control point.
3474   * @param { number } y1 - The y-coordinate of the first control point.
3475   * @param { number } y2 - The Y-axis coordinates of the second control point.
3476   * @param { number } radius - Radius of an arc.
3477   * @syscap SystemCapability.ArkUI.ArkUI.Full
3478   * @since 7
3479   */
3480  /**
3481   * Draws an arc from the beginning to the end.
3482   *
3483   * @param { number } x1 - The X-axis coordinates of the first control point.
3484   * @param { number } x2 - The X-axis coordinates of the second control point.
3485   * @param { number } y1 - The y-coordinate of the first control point.
3486   * @param { number } y2 - The Y-axis coordinates of the second control point.
3487   * @param { number } radius - Radius of an arc.
3488   * @syscap SystemCapability.ArkUI.ArkUI.Full
3489   * @atomicservice
3490   * @since 11
3491   */
3492  arcTo(x1: number, x2: number, y1: number, y2: number, radius: number): void;
3493
3494  /**
3495   * Draw a third order Bezier curve.
3496   *
3497   * @param { number } cp1x - The X-axis coordinates of the first control point.
3498   * @param { number } cp1y - The y-coordinate of the first control point.
3499   * @param { number } cp2x - The X-axis coordinates of the second control point.
3500   * @param { number } cp2y - The Y-axis coordinates of the second control point.
3501   * @param { number } x - The x-coordinate of the end point.
3502   * @param { number } y - The y-coordinate of the end point
3503   * @syscap SystemCapability.ArkUI.ArkUI.Full
3504   * @since 7
3505   */
3506  /**
3507   * Draw a third order Bezier curve.
3508   *
3509   * @param { number } cp1x - The X-axis coordinates of the first control point.
3510   * @param { number } cp1y - The y-coordinate of the first control point.
3511   * @param { number } cp2x - The X-axis coordinates of the second control point.
3512   * @param { number } cp2y - The Y-axis coordinates of the second control point.
3513   * @param { number } x - The x-coordinate of the end point.
3514   * @param { number } y - The y-coordinate of the end point
3515   * @syscap SystemCapability.ArkUI.ArkUI.Full
3516   * @atomicservice
3517   * @since 11
3518   */
3519  bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
3520
3521  /**
3522   * Closing the current path.
3523   *
3524   * @syscap SystemCapability.ArkUI.ArkUI.Full
3525   * @since 7
3526   */
3527  /**
3528   * Closing the current path.
3529   *
3530   * @syscap SystemCapability.ArkUI.ArkUI.Full
3531   * @atomicservice
3532   * @since 11
3533   */
3534  closePath(): void;
3535
3536  /**
3537   * Draw a straight line.
3538   *
3539   * @param { number } x - The X-axis coordinates at the end of the line.
3540   * @param { number } y - The Y-axis coordinates at the end of the line.
3541   * @syscap SystemCapability.ArkUI.ArkUI.Full
3542   * @since 7
3543   */
3544  /**
3545   * Draw a straight line.
3546   *
3547   * @param { number } x - The X-axis coordinates at the end of the line.
3548   * @param { number } y - The Y-axis coordinates at the end of the line.
3549   * @syscap SystemCapability.ArkUI.ArkUI.Full
3550   * @atomicservice
3551   * @since 11
3552   */
3553  lineTo(x: number, y: number): void;
3554
3555  /**
3556   * Draw an ellipse.
3557   *
3558   * @param { number } x - The X-axis coordinates of the center of the ellipse.
3559   * @param { number } y - The Y-axis coordinates of the center of the ellipse.
3560   * @param { number } radiusX - The radius of the major axis of an ellipse.
3561   * @param { number } radiusY - The radius of the short axis of an ellipse.
3562   * @param { number } rotation - The Angle of rotation of an ellipse, expressed in radians.
3563   * @param { number } startAngle - The starting point Angle to be plotted, measured from the X-axis, is expressed in radians.
3564   * @param { number } endAngle - The Angle, expressed in radians, at which the ellipse will be drawn.
3565   * @param { boolean } [anticlockwise] - If true, the ellipse is drawn counterclockwise (counterclockwise) and clockwise otherwise.
3566   * @syscap SystemCapability.ArkUI.ArkUI.Full
3567   * @since 7
3568   */
3569  /**
3570   * Draw an ellipse.
3571   *
3572   * @param { number } x - The X-axis coordinates of the center of the ellipse.
3573   * @param { number } y - The Y-axis coordinates of the center of the ellipse.
3574   * @param { number } radiusX - The radius of the major axis of an ellipse.
3575   * @param { number } radiusY - The radius of the short axis of an ellipse.
3576   * @param { number } rotation - The Angle of rotation of an ellipse, expressed in radians.
3577   * @param { number } startAngle - The starting point Angle to be plotted, measured from the X-axis, is expressed in radians.
3578   * @param { number } endAngle - The Angle, expressed in radians, at which the ellipse will be drawn.
3579   * @param { boolean } [anticlockwise] - If true, the ellipse is drawn counterclockwise (counterclockwise) and clockwise otherwise.
3580   * @syscap SystemCapability.ArkUI.ArkUI.Full
3581   * @atomicservice
3582   * @since 11
3583   */
3584  ellipse(
3585    x: number,
3586    y: number,
3587    radiusX: number,
3588    radiusY: number,
3589    rotation: number,
3590    startAngle: number,
3591    endAngle: number,
3592    anticlockwise?: boolean,
3593  ): void;
3594
3595  /**
3596   * Moves the current canvas to the specified coordinate point.
3597   *
3598   * @param { number } x - The x axis.
3599   * @param { number } y - The y axis.
3600   * @syscap SystemCapability.ArkUI.ArkUI.Full
3601   * @since 7
3602   */
3603  /**
3604   * Moves the current canvas to the specified coordinate point.
3605   *
3606   * @param { number } x - The x axis.
3607   * @param { number } y - The y axis.
3608   * @syscap SystemCapability.ArkUI.ArkUI.Full
3609   * @atomicservice
3610   * @since 11
3611   */
3612  moveTo(x: number, y: number): void;
3613
3614  /**
3615   * Draw a second order Bezier curve.
3616   *
3617   * @param { number } cpx - The X-axis coordinates of the control points.
3618   * @param { number } cpy - The y-coordinate of the control point.
3619   * @param { number } x - The X-axis of the end point.
3620   * @param { number } y - The Y-axis of the end point.
3621   * @syscap SystemCapability.ArkUI.ArkUI.Full
3622   * @since 7
3623   */
3624  /**
3625   * Draw a second order Bezier curve.
3626   *
3627   * @param { number } cpx - The X-axis coordinates of the control points.
3628   * @param { number } cpy - The y-coordinate of the control point.
3629   * @param { number } x - The X-axis of the end point.
3630   * @param { number } y - The Y-axis of the end point.
3631   * @syscap SystemCapability.ArkUI.ArkUI.Full
3632   * @atomicservice
3633   * @since 11
3634   */
3635  quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
3636
3637  /**
3638   * Draw a rectangle.
3639   *
3640   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3641   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3642   * @param { number } w - The width of a rectangle.
3643   * @param { number } h - The height of a rectangle.
3644   * @syscap SystemCapability.ArkUI.ArkUI.Full
3645   * @since 7
3646   */
3647  /**
3648   * Draw a rectangle.
3649   *
3650   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3651   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3652   * @param { number } w - The width of a rectangle.
3653   * @param { number } h - The height of a rectangle.
3654   * @syscap SystemCapability.ArkUI.ArkUI.Full
3655   * @atomicservice
3656   * @since 11
3657   */
3658  rect(x: number, y: number, w: number, h: number): void;
3659
3660  /**
3661   * Clears the contents of the specified rectangular area.
3662   *
3663   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3664   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3665   * @param { number } w - The width of a rectangle.
3666   * @param { number } h - The height of a rectangle.
3667   * @syscap SystemCapability.ArkUI.ArkUI.Full
3668   * @since 7
3669   */
3670  /**
3671   * Clears the contents of the specified rectangular area.
3672   *
3673   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3674   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3675   * @param { number } w - The width of a rectangle.
3676   * @param { number } h - The height of a rectangle.
3677   * @syscap SystemCapability.ArkUI.ArkUI.Full
3678   * @atomicservice
3679   * @since 11
3680   */
3681  clearRect(x: number, y: number, w: number, h: number): void;
3682
3683  /**
3684   * Fills a rectangular area.
3685   *
3686   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3687   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3688   * @param { number } w - The width of a rectangle.
3689   * @param { number } h - The height of a rectangle.
3690   * @syscap SystemCapability.ArkUI.ArkUI.Full
3691   * @since 7
3692   */
3693  /**
3694   * Fills a rectangular area.
3695   *
3696   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3697   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3698   * @param { number } w - The width of a rectangle.
3699   * @param { number } h - The height of a rectangle.
3700   * @syscap SystemCapability.ArkUI.ArkUI.Full
3701   * @atomicservice
3702   * @since 11
3703   */
3704  fillRect(x: number, y: number, w: number, h: number): void;
3705
3706  /**
3707   * Stroke a rectangular area.
3708   *
3709   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3710   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3711   * @param { number } w - The width of the rectangle. Positive values on the right, negative values on the left.
3712   * @param { number } h - The height of the rectangle. Positive values are down, negative values are up.
3713   * @syscap SystemCapability.ArkUI.ArkUI.Full
3714   * @since 7
3715   */
3716  /**
3717   * Stroke a rectangular area.
3718   *
3719   * @param { number } x - The X-axis coordinates at the beginning of the rectangle.
3720   * @param { number } y - The Y-axis coordinates at the beginning of the rectangle.
3721   * @param { number } w - The width of the rectangle. Positive values on the right, negative values on the left.
3722   * @param { number } h - The height of the rectangle. Positive values are down, negative values are up.
3723   * @syscap SystemCapability.ArkUI.ArkUI.Full
3724   * @atomicservice
3725   * @since 11
3726   */
3727  strokeRect(x: number, y: number, w: number, h: number): void;
3728
3729  /**
3730   * Stroke a rectangular area.
3731   *
3732   * @param { string } text - Render text using the current values of font, textAlign, textBaseline, and direction.
3733   * @param { number } y - The Y-axis coordinates of the starting point of the text.
3734   * @param { number } x - The X-axis coordinates of the starting point of the text.
3735   * @syscap SystemCapability.ArkUI.ArkUI.Full
3736   * @since 7
3737   */
3738  /**
3739   * Stroke a rectangular area.
3740   *
3741   * @param { string } text - Render text using the current values of font, textAlign, textBaseline, and direction.
3742   * @param { number } y - The Y-axis coordinates of the starting point of the text.
3743   * @param { number } x - The X-axis coordinates of the starting point of the text.
3744   * @syscap SystemCapability.ArkUI.ArkUI.Full
3745   * @atomicservice
3746   * @since 11
3747   */
3748  fillText(text: string, y: number, x: number /*, maxWidth?: number*/): void;
3749
3750  /**
3751   * Returns a TextMetrics object used to obtain the width of specified text.
3752   *
3753   * @param { string } text - Text to be measured.
3754   * @returns { TextMetrics } Object that contains the text width. You can obtain the width by TextMetrics.width.
3755   * @syscap SystemCapability.ArkUI.ArkUI.Full
3756   * @since 7
3757   */
3758  /**
3759   * Returns a TextMetrics object used to obtain the width of specified text.
3760   *
3761   * @param { string } text - Text to be measured.
3762   * @returns { TextMetrics } Object that contains the text width. You can obtain the width by TextMetrics.width.
3763   * @syscap SystemCapability.ArkUI.ArkUI.Full
3764   * @atomicservice
3765   * @since 11
3766   */
3767  measureText(text: string): TextMetrics;
3768
3769  /**
3770   * Draws the stroke of a text string.
3771   *
3772   * @param { string } text - Text stroke to draw.
3773   * @param { number } x - X-coordinate of the lower left corner of the text stroke.
3774   * @param { number } y - Y-coordinate of the lower left corner of the text stroke.
3775   * @syscap SystemCapability.ArkUI.ArkUI.Full
3776   * @since 7
3777   */
3778  /**
3779   * Draws the stroke of a text string.
3780   *
3781   * @param { string } text - Text stroke to draw.
3782   * @param { number } x - X-coordinate of the lower left corner of the text stroke.
3783   * @param { number } y - Y-coordinate of the lower left corner of the text stroke.
3784   * @syscap SystemCapability.ArkUI.ArkUI.Full
3785   * @atomicservice
3786   * @since 11
3787   */
3788  strokeText(text: string, x: number, y: number /*, maxWidth?: number*/): void;
3789
3790  /**
3791   * Resets the current matrix transformation effect.
3792   *
3793   * @syscap SystemCapability.ArkUI.ArkUI.Full
3794   * @since 7
3795   */
3796  /**
3797   * Resets the current matrix transformation effect.
3798   *
3799   * @syscap SystemCapability.ArkUI.ArkUI.Full
3800   * @atomicservice
3801   * @since 11
3802   */
3803  resetTransform(): void;
3804
3805  /**
3806   * Adds a rotation effect to the current canvas.
3807   *
3808   * @param { number } angle - The radian of clockwise rotation.
3809   * @syscap SystemCapability.ArkUI.ArkUI.Full
3810   * @since 7
3811   */
3812  /**
3813   * Adds a rotation effect to the current canvas.
3814   *
3815   * @param { number } angle - The radian of clockwise rotation.
3816   * @syscap SystemCapability.ArkUI.ArkUI.Full
3817   * @atomicservice
3818   * @since 11
3819   */
3820  rotate(angle: number): void;
3821
3822  /**
3823   * Adds a zoom effect to the current canvas.
3824   *
3825   * @param { number } x - The horizontal scaling factor.
3826   * @param { number } y - The scaling factor in the vertical direction.
3827   * @syscap SystemCapability.ArkUI.ArkUI.Full
3828   * @since 7
3829   */
3830  /**
3831   * Adds a zoom effect to the current canvas.
3832   *
3833   * @param { number } x - The horizontal scaling factor.
3834   * @param { number } y - The scaling factor in the vertical direction.
3835   * @syscap SystemCapability.ArkUI.ArkUI.Full
3836   * @atomicservice
3837   * @since 11
3838   */
3839  scale(x: number, y: number): void;
3840
3841  /**
3842   * Set the rotation, pan, and zoom effects.
3843   *
3844   * @param { number } a - The level of zoom.
3845   * @param { number } b - Vertical tilt.
3846   * @param { number } c - Horizontal tilt.
3847   * @param { number } d - Vertical scaling.
3848   * @param { number } e - The level of mobile.
3849   * @param { number } f - Vertical movement.
3850   * @syscap SystemCapability.ArkUI.ArkUI.Full
3851   * @since 7
3852   */
3853  /**
3854   * Set the rotation, pan, and zoom effects.
3855   *
3856   * @param { number } a - The level of zoom.
3857   * @param { number } b - Vertical tilt.
3858   * @param { number } c - Horizontal tilt.
3859   * @param { number } d - Vertical scaling.
3860   * @param { number } e - The level of mobile.
3861   * @param { number } f - Vertical movement.
3862   * @syscap SystemCapability.ArkUI.ArkUI.Full
3863   * @atomicservice
3864   * @since 11
3865   */
3866  setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
3867
3868  /**
3869   * Set the rotation, pan, and zoom effects.
3870   *
3871   * @param { number } a - The level of zoom.
3872   * @param { number } b - Vertical tilt.
3873   * @param { number } c - Horizontal tilt.
3874   * @param { number } d - Vertical scaling.
3875   * @param { number } e - The level of mobile.
3876   * @param { number } f - Vertical movement.
3877   * @syscap SystemCapability.ArkUI.ArkUI.Full
3878   * @since 7
3879   */
3880  /**
3881   * Set the rotation, pan, and zoom effects.
3882   *
3883   * @param { number } a - The level of zoom.
3884   * @param { number } b - Vertical tilt.
3885   * @param { number } c - Horizontal tilt.
3886   * @param { number } d - Vertical scaling.
3887   * @param { number } e - The level of mobile.
3888   * @param { number } f - Vertical movement.
3889   * @syscap SystemCapability.ArkUI.ArkUI.Full
3890   * @atomicservice
3891   * @since 11
3892   */
3893  transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
3894
3895  /**
3896   * Adds a pan effect to the current canvas.
3897   *
3898   * @param { number } x - Horizontal movement distance.
3899   * @param { number } y - Vertical movement.
3900   * @syscap SystemCapability.ArkUI.ArkUI.Full
3901   * @since 7
3902   */
3903  /**
3904   * Adds a pan effect to the current canvas.
3905   *
3906   * @param { number } x - Horizontal movement distance.
3907   * @param { number } y - Vertical movement.
3908   * @syscap SystemCapability.ArkUI.ArkUI.Full
3909   * @atomicservice
3910   * @since 11
3911   */
3912  translate(x: number, y: number): void;
3913
3914  /**
3915   * Restores the configuration information of the last saved canvas context.
3916   *
3917   * @syscap SystemCapability.ArkUI.ArkUI.Full
3918   * @since 7
3919   */
3920  /**
3921   * Restores the configuration information of the last saved canvas context.
3922   *
3923   * @syscap SystemCapability.ArkUI.ArkUI.Full
3924   * @atomicservice
3925   * @since 11
3926   */
3927  restore(): void;
3928
3929  /**
3930   * Saves configuration information for the current canvas context.
3931   *
3932   * @syscap SystemCapability.ArkUI.ArkUI.Full
3933   * @since 7
3934   */
3935  /**
3936   * Saves configuration information for the current canvas context.
3937   *
3938   * @syscap SystemCapability.ArkUI.ArkUI.Full
3939   * @atomicservice
3940   * @since 11
3941   */
3942  save(): void;
3943}
3944
3945/**
3946 * CanvasRenderingContext2D allows you to draw rectangles, text, images, and other objects on a canvas.
3947 * You can call getContext('2d') on canvas to obtain a CanvasRenderingContext2D object.
3948 *
3949 * @interface CanvasRenderingContext2D
3950 * @syscap SystemCapability.ArkUI.ArkUI.Full
3951 * @since 4
3952 */
3953/**
3954 * CanvasRenderingContext2D allows you to draw rectangles, text, images, and other objects on a canvas.
3955 * You can call getContext('2d') on canvas to obtain a CanvasRenderingContext2D object.
3956 *
3957 * @interface CanvasRenderingContext2D
3958 * @syscap SystemCapability.ArkUI.ArkUI.Full
3959 * @atomicservice
3960 * @since 11
3961 */
3962export interface CanvasRenderingContext2D {
3963  /**
3964   * Fills a rectangle on the canvas.
3965   *
3966   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
3967   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
3968   * @param { number } width - Width of the rectangle.
3969   * @param { number } height - Height of the rectangle.
3970   * @syscap SystemCapability.ArkUI.ArkUI.Full
3971   * @since 4
3972   */
3973  /**
3974   * Fills a rectangle on the canvas.
3975   *
3976   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
3977   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
3978   * @param { number } width - Width of the rectangle.
3979   * @param { number } height - Height of the rectangle.
3980   * @syscap SystemCapability.ArkUI.ArkUI.Full
3981   * @atomicservice
3982   * @since 11
3983   */
3984  fillRect(x: number, y: number, width: number, height: number): void;
3985
3986  /**
3987   * Sets the style of a paint to fill an area.
3988   * Paint color used to fill the area.
3989   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
3990   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
3991   *
3992   * @type { ?(string | CanvasGradient | CanvasPattern) }
3993   * @syscap SystemCapability.ArkUI.ArkUI.Full
3994   * @since 4
3995   */
3996  /**
3997   * Sets the style of a paint to fill an area.
3998   * Paint color used to fill the area.
3999   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
4000   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
4001   *
4002   * @type { ?(string | CanvasGradient | CanvasPattern) }
4003   * @syscap SystemCapability.ArkUI.ArkUI.Full
4004   * @atomicservice
4005   * @since 11
4006   */
4007  fillStyle?: string | CanvasGradient | CanvasPattern;
4008
4009  /**
4010   * Clears the content in a rectangle on the canvas.
4011   *
4012   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
4013   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
4014   * @param { number } width - Width of the rectangle.
4015   * @param { number } height - Height of the rectangle.
4016   * @syscap SystemCapability.ArkUI.ArkUI.Full
4017   * @since 4
4018   */
4019  /**
4020   * Clears the content in a rectangle on the canvas.
4021   *
4022   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
4023   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
4024   * @param { number } width - Width of the rectangle.
4025   * @param { number } height - Height of the rectangle.
4026   * @syscap SystemCapability.ArkUI.ArkUI.Full
4027   * @atomicservice
4028   * @since 11
4029   */
4030  clearRect(x: number, y: number, width: number, height: number): void;
4031
4032  /**
4033   * Draws a rectangle stroke on the canvas.
4034   *
4035   * @param { number } x - X-coordinate of the upper left corner of the rectangle stroke.
4036   * @param { number } y - Y-coordinate of the upper left corner of the rectangle stroke.
4037   * @param { number } width - Width of the rectangle stroke.
4038   * @param { number } height - Height of the rectangle stroke.
4039   * @syscap SystemCapability.ArkUI.ArkUI.Full
4040   * @since 4
4041   */
4042  /**
4043   * Draws a rectangle stroke on the canvas.
4044   *
4045   * @param { number } x - X-coordinate of the upper left corner of the rectangle stroke.
4046   * @param { number } y - Y-coordinate of the upper left corner of the rectangle stroke.
4047   * @param { number } width - Width of the rectangle stroke.
4048   * @param { number } height - Height of the rectangle stroke.
4049   * @syscap SystemCapability.ArkUI.ArkUI.Full
4050   * @atomicservice
4051   * @since 11
4052   */
4053  strokeRect(x: number, y: number, width: number, height: number): void;
4054
4055  /**
4056   * Draws filled text on the canvas.
4057   *
4058   * @param { string } text - Text to draw.
4059   * @param { number } x - X-coordinate of the lower left corner of the text.
4060   * @param { number } y - Y-coordinate of the lower left corner of the text.
4061   * @syscap SystemCapability.ArkUI.ArkUI.Full
4062   * @since 4
4063   */
4064  /**
4065   * Draws filled text on the canvas.
4066   *
4067   * @param { string } text - Text to draw.
4068   * @param { number } x - X-coordinate of the lower left corner of the text.
4069   * @param { number } y - Y-coordinate of the lower left corner of the text.
4070   * @syscap SystemCapability.ArkUI.ArkUI.Full
4071   * @atomicservice
4072   * @since 11
4073   */
4074  fillText(text: string, x: number, y: number): void;
4075
4076  /**
4077   * Draws a text stroke on the canvas.
4078   *
4079   * @param { string } text - Text stroke to draw.
4080   * @param { number } x - X-coordinate of the lower left corner of the text stroke.
4081   * @param { number } y - Y-coordinate of the lower left corner of the text stroke.
4082   * @syscap SystemCapability.ArkUI.ArkUI.Full
4083   * @since 4
4084   */
4085  /**
4086   * Draws a text stroke on the canvas.
4087   *
4088   * @param { string } text - Text stroke to draw.
4089   * @param { number } x - X-coordinate of the lower left corner of the text stroke.
4090   * @param { number } y - Y-coordinate of the lower left corner of the text stroke.
4091   * @syscap SystemCapability.ArkUI.ArkUI.Full
4092   * @atomicservice
4093   * @since 11
4094   */
4095  strokeText(text: string, x: number, y: number): void;
4096
4097  /**
4098   * Returns a TextMetrics object used to obtain the width of specified text.
4099   *
4100   * @param { string } text - Text to be measured.
4101   * @returns { TextMetrics } Object that contains the text width. You can obtain the width by TextMetrics.width.
4102   * @syscap SystemCapability.ArkUI.ArkUI.Full
4103   * @since 4
4104   */
4105  /**
4106   * Returns a TextMetrics object used to obtain the width of specified text.
4107   *
4108   * @param { string } text - Text to be measured.
4109   * @returns { TextMetrics } Object that contains the text width. You can obtain the width by TextMetrics.width.
4110   * @syscap SystemCapability.ArkUI.ArkUI.Full
4111   * @atomicservice
4112   * @since 11
4113   */
4114  measureText(text: string): TextMetrics;
4115
4116  /**
4117   * Sets the width of a line.
4118   *
4119   * @type { ?number }
4120   * @syscap SystemCapability.ArkUI.ArkUI.Full
4121   * @since 4
4122   */
4123  /**
4124   * Sets the width of a line.
4125   *
4126   * @type { ?number }
4127   * @syscap SystemCapability.ArkUI.ArkUI.Full
4128   * @atomicservice
4129   * @since 11
4130   */
4131  lineWidth?: number;
4132
4133  /**
4134   * Sets the stroke paint style.
4135   * Color of the stroke paint.
4136   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
4137   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
4138   *
4139   * @type { ?(string | CanvasGradient | CanvasPattern) }
4140   * @syscap SystemCapability.ArkUI.ArkUI.Full
4141   * @since 4
4142   */
4143  /**
4144   * Sets the stroke paint style.
4145   * Color of the stroke paint.
4146   * Canvas gradient object used by the paint. You can call createLinearGradient() to create a CanvasGradient object.
4147   * Canvas pattern. You can call createPattern() to create a CanvasPattern object.
4148   *
4149   * @type { ?(string | CanvasGradient | CanvasPattern) }
4150   * @syscap SystemCapability.ArkUI.ArkUI.Full
4151   * @atomicservice
4152   * @since 11
4153   */
4154  strokeStyle?: string | CanvasGradient | CanvasPattern;
4155
4156  /**
4157   * Draws a border stroke.
4158   *
4159   * @syscap SystemCapability.ArkUI.ArkUI.Full
4160   * @since 4
4161   */
4162  /**
4163   * Draws a border stroke.
4164   *
4165   * @syscap SystemCapability.ArkUI.ArkUI.Full
4166   * @atomicservice
4167   * @since 11
4168   */
4169  stroke(): void;
4170
4171  /**
4172   * Draws a path stroke.
4173   *
4174   * @param { Path2D } path - The object of Path2D.
4175   * @syscap SystemCapability.ArkUI.ArkUI.Full
4176   * @since 4
4177   */
4178  /**
4179   * Draws a path stroke.
4180   *
4181   * @param { Path2D } path - The object of Path2D.
4182   * @syscap SystemCapability.ArkUI.ArkUI.Full
4183   * @atomicservice
4184   * @since 11
4185   */
4186  stroke(path: Path2D): void;
4187
4188  /**
4189   * Creates a drawing path.
4190   *
4191   * @syscap SystemCapability.ArkUI.ArkUI.Full
4192   * @since 4
4193   */
4194  /**
4195   * Creates a drawing path.
4196   *
4197   * @syscap SystemCapability.ArkUI.ArkUI.Full
4198   * @atomicservice
4199   * @since 11
4200   */
4201  beginPath(): void;
4202
4203  /**
4204   * Moves a drawing path to a target position on the canvas.
4205   *
4206   * @param { number } x - X-coordinate of the target position.
4207   * @param { number } y - Y-coordinate of the target position.
4208   * @syscap SystemCapability.ArkUI.ArkUI.Full
4209   * @since 4
4210   */
4211  /**
4212   * Moves a drawing path to a target position on the canvas.
4213   *
4214   * @param { number } x - X-coordinate of the target position.
4215   * @param { number } y - Y-coordinate of the target position.
4216   * @syscap SystemCapability.ArkUI.ArkUI.Full
4217   * @atomicservice
4218   * @since 11
4219   */
4220  moveTo(x: number, y: number): void;
4221
4222  /**
4223   * Connects the current point to a target position using a straight line.
4224   *
4225   * @param { number } x - X-coordinate of the target position.
4226   * @param { number } y - Y-coordinate of the target position.
4227   * @syscap SystemCapability.ArkUI.ArkUI.Full
4228   * @since 4
4229   */
4230  /**
4231   * Connects the current point to a target position using a straight line.
4232   *
4233   * @param { number } x - X-coordinate of the target position.
4234   * @param { number } y - Y-coordinate of the target position.
4235   * @syscap SystemCapability.ArkUI.ArkUI.Full
4236   * @atomicservice
4237   * @since 11
4238   */
4239  lineTo(x: number, y: number): void;
4240
4241  /**
4242   * Draws a closed path.
4243   *
4244   * @syscap SystemCapability.ArkUI.ArkUI.Full
4245   * @since 4
4246   */
4247  /**
4248   * Draws a closed path.
4249   *
4250   * @syscap SystemCapability.ArkUI.ArkUI.Full
4251   * @atomicservice
4252   * @since 11
4253   */
4254  closePath(): void;
4255
4256  /**
4257   * Sets the style of line endpoints.
4258   * Style of line endpoints. Available values include:
4259   * butt (default): The endpoints of the line are in square.
4260   * round: The endpoints of the line are rounded.
4261   * square: The endpoints of the line are in square,
4262   * and each end of the line is added with a rectangle whose length is the same as the line thickness and whose width is half of the line thickness.
4263   *
4264   * @type { string }
4265   * @syscap SystemCapability.ArkUI.ArkUI.Full
4266   * @since 4
4267   */
4268  /**
4269   * Sets the style of line endpoints.
4270   * Style of line endpoints. Available values include:
4271   * butt (default): The endpoints of the line are in square.
4272   * round: The endpoints of the line are rounded.
4273   * square: The endpoints of the line are in square,
4274   * and each end of the line is added with a rectangle whose length is the same as the line thickness and whose width is half of the line thickness.
4275   *
4276   * @type { string }
4277   * @syscap SystemCapability.ArkUI.ArkUI.Full
4278   * @atomicservice
4279   * @since 11
4280   */
4281  lineCap: string;
4282
4283  /**
4284   * Sets the style for an intersection point where a line joins another.
4285   * Style of the intersection point of lines. Available values include:
4286   * round: The intersection part is a sector. The radius of a rounded corner is equal to the line width.
4287   * bevel: The intersection part is a triangle. The rectangular corner of each line is independent.
4288   * miter (default): The intersection part has a miter corner by extending the outside edges of the lines until they meet.
4289   * You can view the effect of this attribute in miterLimit.
4290   *
4291   * @type { string }
4292   * @syscap SystemCapability.ArkUI.ArkUI.Full
4293   * @since 4
4294   */
4295  /**
4296   * Sets the style for an intersection point where a line joins another.
4297   * Style of the intersection point of lines. Available values include:
4298   * round: The intersection part is a sector. The radius of a rounded corner is equal to the line width.
4299   * bevel: The intersection part is a triangle. The rectangular corner of each line is independent.
4300   * miter (default): The intersection part has a miter corner by extending the outside edges of the lines until they meet.
4301   * You can view the effect of this attribute in miterLimit.
4302   *
4303   * @type { string }
4304   * @syscap SystemCapability.ArkUI.ArkUI.Full
4305   * @atomicservice
4306   * @since 11
4307   */
4308  lineJoin: string;
4309
4310  /**
4311   * Sets the maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.
4312   * Maximum miter length. The default value is 10.
4313   *
4314   * @type { number }
4315   * @syscap SystemCapability.ArkUI.ArkUI.Full
4316   * @since 4
4317   */
4318  /**
4319   * Sets the maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.
4320   * Maximum miter length. The default value is 10.
4321   *
4322   * @type { number }
4323   * @syscap SystemCapability.ArkUI.ArkUI.Full
4324   * @atomicservice
4325   * @since 11
4326   */
4327  miterLimit: number;
4328
4329  /**
4330   * Sets the font style.
4331   * Font style.
4332   * The default value is 10px sans-serif in tv, phone, tablet, wearable.
4333   * The default value is 30px SourceHanSansSC-Regular in smartVision.
4334   *
4335   * @type { string }
4336   * @syscap SystemCapability.ArkUI.ArkUI.Full
4337   * @since 4
4338   */
4339  /**
4340   * Sets the font style.
4341   * Font style.
4342   * The default value is 10px sans-serif in tv, phone, tablet, wearable.
4343   * The default value is 30px SourceHanSansSC-Regular in smartVision.
4344   *
4345   * @type { string }
4346   * @syscap SystemCapability.ArkUI.ArkUI.Full
4347   * @atomicservice
4348   * @since 11
4349   */
4350  font: string;
4351
4352  /**
4353   * Sets the text alignment mode.
4354   * Text alignment mode. Available values include:
4355   * left (default): The text is left-aligned.
4356   * right: The text is right-aligned.
4357   * center: The text is center-aligned.
4358   * start: The text is aligned with the start bound. Can't be supported by smartVision.
4359   * end: The text is aligned with the end bound. Can't be supported by smartVision.
4360   * NOTE
4361   * In the ltr layout mode, the value start equals to left. In the rtl layout mode, the value start equals to right.
4362   *
4363   * @type { "left" | "right" | "center" | "start" | "end" }
4364   * @syscap SystemCapability.ArkUI.ArkUI.Full
4365   * @since 4
4366   */
4367  /**
4368   * Sets the text alignment mode.
4369   * Text alignment mode. Available values include:
4370   * left (default): The text is left-aligned.
4371   * right: The text is right-aligned.
4372   * center: The text is center-aligned.
4373   * start: The text is aligned with the start bound. Can't be supported by smartVision.
4374   * end: The text is aligned with the end bound. Can't be supported by smartVision.
4375   * NOTE
4376   * In the ltr layout mode, the value start equals to left. In the rtl layout mode, the value start equals to right.
4377   *
4378   * @type { "left" | "right" | "center" | "start" | "end" }
4379   * @syscap SystemCapability.ArkUI.ArkUI.Full
4380   * @atomicservice
4381   * @since 11
4382   */
4383  textAlign: "left" | "right" | "center" | "start" | "end";
4384
4385  /**
4386   * Sets whether an image is smooth.
4387   * default value is true.
4388   *
4389   * @type { boolean }
4390   * @syscap SystemCapability.ArkUI.ArkUI.Full
4391   * @since 4
4392   */
4393  /**
4394   * Sets whether an image is smooth.
4395   * default value is true.
4396   *
4397   * @type { boolean }
4398   * @syscap SystemCapability.ArkUI.ArkUI.Full
4399   * @atomicservice
4400   * @since 11
4401   */
4402  imageSmoothingEnabled: boolean;
4403
4404  /**
4405   * Sets a text baseline in the horizontal direction for text alignment.
4406   * Text baseline. Available values include:
4407   * alphabetic (default): The text baseline is the normal alphabetic baseline.
4408   * top: The text baseline is on the top of the text bounding box.
4409   * hanging: The text baseline is a hanging baseline over the text.
4410   * middle: The text baseline is in the middle of the text bounding box.
4411   * ideographic: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline,
4412   * the ideographic baseline is located at the bottom of the excessive character.
4413   * bottom: The text baseline is at the bottom of the text bounding box.
4414   * Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.
4415   *
4416   * @type { string }
4417   * @syscap SystemCapability.ArkUI.ArkUI.Full
4418   * @since 4
4419   */
4420  /**
4421   * Sets a text baseline in the horizontal direction for text alignment.
4422   * Text baseline. Available values include:
4423   * alphabetic (default): The text baseline is the normal alphabetic baseline.
4424   * top: The text baseline is on the top of the text bounding box.
4425   * hanging: The text baseline is a hanging baseline over the text.
4426   * middle: The text baseline is in the middle of the text bounding box.
4427   * ideographic: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline,
4428   * the ideographic baseline is located at the bottom of the excessive character.
4429   * bottom: The text baseline is at the bottom of the text bounding box.
4430   * Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.
4431   *
4432   * @type { string }
4433   * @syscap SystemCapability.ArkUI.ArkUI.Full
4434   * @atomicservice
4435   * @since 11
4436   */
4437  textBaseline: string;
4438
4439  /**
4440   * Creates a linear gradient color.
4441   *
4442   * @param { number } x0 - X-coordinate of the start point.
4443   * @param { number } y0 - Y-coordinate of the start point.
4444   * @param { number } x1 - X-coordinate of the end point.
4445   * @param { number } y1 - Y-coordinate of the end point.
4446   * @returns { CanvasGradient } LinearGradient object.
4447   * @syscap SystemCapability.ArkUI.ArkUI.Full
4448   * @since 6
4449   */
4450  /**
4451   * Creates a linear gradient color.
4452   *
4453   * @param { number } x0 - X-coordinate of the start point.
4454   * @param { number } y0 - Y-coordinate of the start point.
4455   * @param { number } x1 - X-coordinate of the end point.
4456   * @param { number } y1 - Y-coordinate of the end point.
4457   * @returns { CanvasGradient } LinearGradient object.
4458   * @syscap SystemCapability.ArkUI.ArkUI.Full
4459   * @atomicservice
4460   * @since 11
4461   */
4462  createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
4463
4464  /**
4465   * Creates a radial gradient color.
4466   *
4467   * @param { number } x0 - X-coordinate of the start point.
4468   * @param { number } y0 - Y-coordinate of the start point.
4469   * @param { number } r0 - The radius of the starting circle.
4470   * @param { number } x1 - X-coordinate of the end point.
4471   * @param { number } y1 - Y-coordinate of the end point.
4472   * @param { number } r1 - The radius of End Circle.
4473   * @returns { CanvasGradient } RadialGradient object.
4474   * @syscap SystemCapability.ArkUI.ArkUI.Full
4475   * @since 6
4476   */
4477  /**
4478   * Creates a radial gradient color.
4479   *
4480   * @param { number } x0 - X-coordinate of the start point.
4481   * @param { number } y0 - Y-coordinate of the start point.
4482   * @param { number } r0 - The radius of the starting circle.
4483   * @param { number } x1 - X-coordinate of the end point.
4484   * @param { number } y1 - Y-coordinate of the end point.
4485   * @param { number } r1 - The radius of End Circle.
4486   * @returns { CanvasGradient } RadialGradient object.
4487   * @syscap SystemCapability.ArkUI.ArkUI.Full
4488   * @atomicservice
4489   * @since 11
4490   */
4491  createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
4492
4493  /**
4494   * Creates a pattern for image filling based on a specified source image and repetition mode.
4495   *
4496   * @param { Image } image - Source image.
4497   * @param { string } repetition - Repetition mode. The value can be "repeat", "repeat-x", "repeat-y", or "no-repeat".
4498   * @returns { object } Pattern of image filling.
4499   * @syscap SystemCapability.ArkUI.ArkUI.Full
4500   * @since 4
4501   */
4502  /**
4503   * Creates a pattern for image filling based on a specified source image and repetition mode.
4504   *
4505   * @param { Image } image - Source image.
4506   * @param { string } repetition - Repetition mode. The value can be "repeat", "repeat-x", "repeat-y", or "no-repeat".
4507   * @returns { object } Pattern of image filling.
4508   * @syscap SystemCapability.ArkUI.ArkUI.Full
4509   * @atomicservice
4510   * @since 11
4511   */
4512  createPattern(image: Image, repetition: string): object;
4513
4514  /**
4515   * Creates a path that is later used by the CanvasRenderingContext2D object.
4516   *
4517   * @param { Path2D } [path] - another created Path2D object.
4518   * @returns { Path2D } the object of Path2D.
4519   * @syscap SystemCapability.ArkUI.ArkUI.Full
4520   * @since 4
4521   */
4522  /**
4523   * Creates a path that is later used by the CanvasRenderingContext2D object.
4524   *
4525   * @param { Path2D } [path] - another created Path2D object.
4526   * @returns { Path2D } the object of Path2D.
4527   * @syscap SystemCapability.ArkUI.ArkUI.Full
4528   * @atomicservice
4529   * @since 11
4530   */
4531  createPath2D(path?: Path2D): Path2D;
4532
4533  /**
4534   * Creates a path that is later used by the CanvasRenderingContext2D object.
4535   *
4536   * @param { string } [cmds] - a string defined using the SVG path command.
4537   * @returns { Path2D } the object of Path2D.
4538   * @syscap SystemCapability.ArkUI.ArkUI.Full
4539   * @since 4
4540   */
4541  /**
4542   * Creates a path that is later used by the CanvasRenderingContext2D object.
4543   *
4544   * @param { string } [cmds] - a string defined using the SVG path command.
4545   * @returns { Path2D } the object of Path2D.
4546   * @syscap SystemCapability.ArkUI.ArkUI.Full
4547   * @atomicservice
4548   * @since 11
4549   */
4550  createPath2D(cmds?: string): Path2D;
4551
4552  /**
4553   * Draws a cubic bezier curve on the canvas.
4554   *
4555   * @param { number } cp1x - X-coordinate of the first parameter of the bezier curve.
4556   * @param { number } cp1y - Y-coordinate of the first parameter of the bezier curve.
4557   * @param { number } cp2x - X-coordinate of the second parameter of the bezier curve.
4558   * @param { number } cp2y - Y-coordinate of the second parameter of the bezier curve.
4559   * @param { number } x - End point x-coordinate of the bezier curve.
4560   * @param { number } y - End point y-coordinate of the bezier curve.
4561   * @syscap SystemCapability.ArkUI.ArkUI.Full
4562   * @since 4
4563   */
4564  /**
4565   * Draws a cubic bezier curve on the canvas.
4566   *
4567   * @param { number } cp1x - X-coordinate of the first parameter of the bezier curve.
4568   * @param { number } cp1y - Y-coordinate of the first parameter of the bezier curve.
4569   * @param { number } cp2x - X-coordinate of the second parameter of the bezier curve.
4570   * @param { number } cp2y - Y-coordinate of the second parameter of the bezier curve.
4571   * @param { number } x - End point x-coordinate of the bezier curve.
4572   * @param { number } y - End point y-coordinate of the bezier curve.
4573   * @syscap SystemCapability.ArkUI.ArkUI.Full
4574   * @atomicservice
4575   * @since 11
4576   */
4577  bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
4578
4579  /**
4580   * Draws a quadratic curve on the canvas.
4581   *
4582   * @param { number } cpx - X-coordinate of the bezier curve parameter.
4583   * @param { number } cpy - Y-coordinate of the bezier curve parameter.
4584   * @param { number } x - End point x-coordinate of the bezier curve.
4585   * @param { number } y - End point y-coordinate of the bezier curve.
4586   * @syscap SystemCapability.ArkUI.ArkUI.Full
4587   * @since 4
4588   */
4589  /**
4590   * Draws a quadratic curve on the canvas.
4591   *
4592   * @param { number } cpx - X-coordinate of the bezier curve parameter.
4593   * @param { number } cpy - Y-coordinate of the bezier curve parameter.
4594   * @param { number } x - End point x-coordinate of the bezier curve.
4595   * @param { number } y - End point y-coordinate of the bezier curve.
4596   * @syscap SystemCapability.ArkUI.ArkUI.Full
4597   * @atomicservice
4598   * @since 11
4599   */
4600  quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
4601
4602  /**
4603   * Draws an arc on the canvas.
4604   *
4605   * @param { number } x - X-coordinate of the center point of the arc.
4606   * @param { number } y - Y-coordinate of the center point of the arc.
4607   * @param { number } radius - Radius of the arc.
4608   * @param { number } startAngle - Start radian of the arc.
4609   * @param { number } endAngel - End radian of the arc.
4610   * @param { boolean } [anticlockwise] - Whether to draw the arc counterclockwise.
4611   * @syscap SystemCapability.ArkUI.ArkUI.Full
4612   * @since 4
4613   */
4614  /**
4615   * Draws an arc on the canvas.
4616   *
4617   * @param { number } x - X-coordinate of the center point of the arc.
4618   * @param { number } y - Y-coordinate of the center point of the arc.
4619   * @param { number } radius - Radius of the arc.
4620   * @param { number } startAngle - Start radian of the arc.
4621   * @param { number } endAngel - End radian of the arc.
4622   * @param { boolean } [anticlockwise] - Whether to draw the arc counterclockwise.
4623   * @syscap SystemCapability.ArkUI.ArkUI.Full
4624   * @atomicservice
4625   * @since 11
4626   */
4627  arc(x: number, y: number, radius: number, startAngle: number, endAngel: number, anticlockwise?: boolean): void;
4628
4629  /**
4630   * Draws an arc based on the radius and points on the arc.
4631   *
4632   * @param { number } x1 - X-coordinate of the first point on the arc.
4633   * @param { number } y1 - Y-coordinate of the first point on the arc.
4634   * @param { number } x2 - X-coordinate of the second point on the arc.
4635   * @param { number } y2 - Y-coordinate of the second point on the arc.
4636   * @param { number } radius - Radius of the arc.
4637   * @syscap SystemCapability.ArkUI.ArkUI.Full
4638   * @since 4
4639   */
4640  /**
4641   * Draws an arc based on the radius and points on the arc.
4642   *
4643   * @param { number } x1 - X-coordinate of the first point on the arc.
4644   * @param { number } y1 - Y-coordinate of the first point on the arc.
4645   * @param { number } x2 - X-coordinate of the second point on the arc.
4646   * @param { number } y2 - Y-coordinate of the second point on the arc.
4647   * @param { number } radius - Radius of the arc.
4648   * @syscap SystemCapability.ArkUI.ArkUI.Full
4649   * @atomicservice
4650   * @since 11
4651   */
4652  arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
4653
4654  /**
4655   * Draws an ellipse based on the coordinate and radius.
4656   *
4657   * @param { number } x - X-coordinate of the center point on the ellipse.
4658   * @param { number } y - Y-coordinate of the center point on the ellipse.
4659   * @param { number } radiusX - X-coordinate of the radius Length on the ellipse.
4660   * @param { number } radiusY - Y-coordinate of the radius Length on the ellipse.
4661   * @param { number } rotation - The rotation angle of the ellipse, in radians.
4662   * @param { number } startAngle - Angle of the start point for ellipse drawing.
4663   * @param { number } endAngle - End Point Angle for Ellipse Drawing.
4664   * @param { number } anticlockwise - Indicates whether to draw an ellipse counterclockwise.
4665   * 0: clockwise; 1: counterclockwise. The default value is 0.
4666   * @syscap SystemCapability.ArkUI.ArkUI.Full
4667   * @since 4
4668   */
4669  /**
4670   * Draws an ellipse based on the coordinate and radius.
4671   *
4672   * @param { number } x - X-coordinate of the center point on the ellipse.
4673   * @param { number } y - Y-coordinate of the center point on the ellipse.
4674   * @param { number } radiusX - X-coordinate of the radius Length on the ellipse.
4675   * @param { number } radiusY - Y-coordinate of the radius Length on the ellipse.
4676   * @param { number } rotation - The rotation angle of the ellipse, in radians.
4677   * @param { number } startAngle - Angle of the start point for ellipse drawing.
4678   * @param { number } endAngle - End Point Angle for Ellipse Drawing.
4679   * @param { number } anticlockwise - Indicates whether to draw an ellipse counterclockwise.
4680   * 0: clockwise; 1: counterclockwise. The default value is 0.
4681   * @syscap SystemCapability.ArkUI.ArkUI.Full
4682   * @atomicservice
4683   * @since 11
4684   */
4685  ellipse(
4686    x: number,
4687    y: number,
4688    radiusX: number,
4689    radiusY: number,
4690    rotation: number,
4691    startAngle: number,
4692    endAngle: number,
4693    anticlockwise?: number,
4694  ): void;
4695
4696  /**
4697   * Creates a rectangular.
4698   *
4699   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
4700   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
4701   * @param { number } width - Width of the rectangle.
4702   * @param { number } height - Height of the rectangle.
4703   * @syscap SystemCapability.ArkUI.ArkUI.Full
4704   * @since 4
4705   */
4706  /**
4707   * Creates a rectangular.
4708   *
4709   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
4710   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
4711   * @param { number } width - Width of the rectangle.
4712   * @param { number } height - Height of the rectangle.
4713   * @syscap SystemCapability.ArkUI.ArkUI.Full
4714   * @atomicservice
4715   * @since 11
4716   */
4717  rect(x: number, y: number, width: number, height: number): void;
4718
4719  /**
4720   * Fills the area inside a closed path.
4721   *
4722   * @syscap SystemCapability.ArkUI.ArkUI.Full
4723   * @since 4
4724   */
4725  /**
4726   * Fills the area inside a closed path.
4727   *
4728   * @syscap SystemCapability.ArkUI.ArkUI.Full
4729   * @atomicservice
4730   * @since 11
4731   */
4732  fill(): void;
4733
4734  /**
4735   * Sets a path as the clipping path.
4736   *
4737   * @syscap SystemCapability.ArkUI.ArkUI.Full
4738   * @since 4
4739   */
4740  /**
4741   * Sets a path as the clipping path.
4742   *
4743   * @syscap SystemCapability.ArkUI.ArkUI.Full
4744   * @atomicservice
4745   * @since 11
4746   */
4747  clip(): void;
4748
4749  /**
4750   * Rotates a canvas clockwise around its coordinate axes.
4751   *
4752   * @param { number } rotate - Clockwise rotation angle. You can use Math.PI / 180 to convert the angle to radian.
4753   * @syscap SystemCapability.ArkUI.ArkUI.Full
4754   * @since 4
4755   */
4756  /**
4757   * Rotates a canvas clockwise around its coordinate axes.
4758   *
4759   * @param { number } rotate - Clockwise rotation angle. You can use Math.PI / 180 to convert the angle to radian.
4760   * @syscap SystemCapability.ArkUI.ArkUI.Full
4761   * @atomicservice
4762   * @since 11
4763   */
4764  rotate(rotate: number): void;
4765
4766  /**
4767   * Scales a canvas based on scaling factors.
4768   *
4769   * @param { number } x - Horizontal scale factor.
4770   * @param { number } y - Vertical scale factor.
4771   * @syscap SystemCapability.ArkUI.ArkUI.Full
4772   * @since 4
4773   */
4774  /**
4775   * Scales a canvas based on scaling factors.
4776   *
4777   * @param { number } x - Horizontal scale factor.
4778   * @param { number } y - Vertical scale factor.
4779   * @syscap SystemCapability.ArkUI.ArkUI.Full
4780   * @atomicservice
4781   * @since 11
4782   */
4783  scale(x: number, y: number): void;
4784
4785  /**
4786   * Defines a transformation matrix.
4787   * To transform a graph, you only need to set parameters of the matrix.
4788   * The coordinates of the corresponding graph are multiplied by the matrix values to obtain new coordinates of the transformed graph.
4789   * You can use the matrix to implement multiple transform effects.
4790   *
4791   * @param { number } scaleX - X-axis scale.
4792   * @param { number } skewX - X-axis skew.
4793   * @param { number } skewY - Y-axis skew.
4794   * @param { number } scaleY - Y-axis scale.
4795   * @param { number } translateX - X-axis translation.
4796   * @param { number } translateY - Y-axis translation.
4797   * @syscap SystemCapability.ArkUI.ArkUI.Full
4798   * @since 4
4799   */
4800  /**
4801   * Defines a transformation matrix.
4802   * To transform a graph, you only need to set parameters of the matrix.
4803   * The coordinates of the corresponding graph are multiplied by the matrix values to obtain new coordinates of the transformed graph.
4804   * You can use the matrix to implement multiple transform effects.
4805   *
4806   * @param { number } scaleX - X-axis scale.
4807   * @param { number } skewX - X-axis skew.
4808   * @param { number } skewY - Y-axis skew.
4809   * @param { number } scaleY - Y-axis scale.
4810   * @param { number } translateX - X-axis translation.
4811   * @param { number } translateY - Y-axis translation.
4812   * @syscap SystemCapability.ArkUI.ArkUI.Full
4813   * @atomicservice
4814   * @since 11
4815   */
4816  transform(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void;
4817
4818  /**
4819   * Uses same parameters as the transform() function to reset the existing transformation matrix and create a new transformation matrix.
4820   *
4821   * @param { number } scaleX - X-axis scale.
4822   * @param { number } skewX - X-axis skew.
4823   * @param { number } skewY - Y-axis skew.
4824   * @param { number } scaleY - Y-axis scale.
4825   * @param { number } translateX - X-axis translation.
4826   * @param { number } translateY - Y-axis translation.
4827   * @syscap SystemCapability.ArkUI.ArkUI.Full
4828   * @since 4
4829   */
4830  /**
4831   * Uses same parameters as the transform() function to reset the existing transformation matrix and create a new transformation matrix.
4832   *
4833   * @param { number } scaleX - X-axis scale.
4834   * @param { number } skewX - X-axis skew.
4835   * @param { number } skewY - Y-axis skew.
4836   * @param { number } scaleY - Y-axis scale.
4837   * @param { number } translateX - X-axis translation.
4838   * @param { number } translateY - Y-axis translation.
4839   * @syscap SystemCapability.ArkUI.ArkUI.Full
4840   * @atomicservice
4841   * @since 11
4842   */
4843  setTransform(
4844    scaleX: number,
4845    skewX: number,
4846    skewY: number,
4847    scaleY: number,
4848    translateX: number,
4849    translateY: number,
4850  ): void;
4851
4852  /**
4853   * Moves the origin of the coordinate system.
4854   *
4855   * @param { number } x - X-axis translation.
4856   * @param { number } y - Y-axis translation.
4857   * @syscap SystemCapability.ArkUI.ArkUI.Full
4858   * @since 4
4859   */
4860  /**
4861   * Moves the origin of the coordinate system.
4862   *
4863   * @param { number } x - X-axis translation.
4864   * @param { number } y - Y-axis translation.
4865   * @syscap SystemCapability.ArkUI.ArkUI.Full
4866   * @atomicservice
4867   * @since 11
4868   */
4869  translate(x: number, y: number): void;
4870
4871  /**
4872   * Sets the alpha value.
4873   * Global alpha value to set.
4874   * The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque).
4875   *
4876   * @type { number }
4877   * @syscap SystemCapability.ArkUI.ArkUI.Full
4878   * @since 4
4879   */
4880  /**
4881   * Sets the alpha value.
4882   * Global alpha value to set.
4883   * The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque).
4884   *
4885   * @type { number }
4886   * @syscap SystemCapability.ArkUI.ArkUI.Full
4887   * @atomicservice
4888   * @since 11
4889   */
4890  globalAlpha: number;
4891
4892  /**
4893   * Draws an image.
4894   *
4895   * @param { Image } image - Image resource.
4896   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
4897   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
4898   * @param { number } dWidth - Width of the drawing area.
4899   * @param { number } dHeight - Height of the drawing area.
4900   * @syscap SystemCapability.ArkUI.ArkUI.Full
4901   * @since 4
4902   */
4903  /**
4904   * Draws an image.
4905   *
4906   * @param { Image } image - Image resource.
4907   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
4908   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
4909   * @param { number } dWidth - Width of the drawing area.
4910   * @param { number } dHeight - Height of the drawing area.
4911   * @syscap SystemCapability.ArkUI.ArkUI.Full
4912   * @atomicservice
4913   * @since 11
4914   */
4915  drawImage(image: Image, dx: number, dy: number, dWidth: number, dHeight: number): void;
4916
4917  /**
4918   * Draws an image.
4919   *
4920   * @param { Image } image - Image resource.
4921   * @param { number } sx - X-coordinate of the upper left corner of the rectangle used to crop the source image.
4922   * @param { number } sy - Y-coordinate of the upper left corner of the rectangle used to crop the source image.
4923   * @param { number } sWidth - Target width of the image to crop.
4924   * @param { number } sHeight - Target height of the image to crop.
4925   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
4926   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
4927   * @param { number } dWidth - Width of the drawing area.
4928   * @param { number } dHeight - Height of the drawing area.
4929   * @syscap SystemCapability.ArkUI.ArkUI.Full
4930   * @since 4
4931   */
4932  /**
4933   * Draws an image.
4934   *
4935   * @param { Image } image - Image resource.
4936   * @param { number } sx - X-coordinate of the upper left corner of the rectangle used to crop the source image.
4937   * @param { number } sy - Y-coordinate of the upper left corner of the rectangle used to crop the source image.
4938   * @param { number } sWidth - Target width of the image to crop.
4939   * @param { number } sHeight - Target height of the image to crop.
4940   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
4941   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
4942   * @param { number } dWidth - Width of the drawing area.
4943   * @param { number } dHeight - Height of the drawing area.
4944   * @syscap SystemCapability.ArkUI.ArkUI.Full
4945   * @atomicservice
4946   * @since 11
4947   */
4948  drawImage(
4949    image: Image,
4950    sx: number,
4951    sy: number,
4952    sWidth: number,
4953    sHeight: number,
4954    dx: number,
4955    dy: number,
4956    dWidth: number,
4957    dHeight: number,
4958  ): void;
4959
4960  /**
4961   * Draws an image.
4962   *
4963   * @param { image.PixelMap } image - Image resource.
4964   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
4965   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
4966   * @param { number } dWidth - Width of the drawing area.
4967   * @param { number } dHeight - Height of the drawing area.
4968   * @syscap SystemCapability.ArkUI.ArkUI.Full
4969   * @since 9
4970   */
4971  /**
4972   * Draws an image.
4973   *
4974   * @param { image.PixelMap } image - Image resource.
4975   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
4976   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
4977   * @param { number } dWidth - Width of the drawing area.
4978   * @param { number } dHeight - Height of the drawing area.
4979   * @syscap SystemCapability.ArkUI.ArkUI.Full
4980   * @atomicservice
4981   * @since 11
4982   */
4983  drawImage(image: image.PixelMap, dx: number, dy: number, dWidth: number, dHeight: number): void;
4984
4985  /**
4986   * Draws an image.
4987   *
4988   * @param { image.PixelMap } image - Image resource.
4989   * @param { number } sx - X-coordinate of the upper left corner of the rectangle used to crop the source image.
4990   * @param { number } sy - Y-coordinate of the upper left corner of the rectangle used to crop the source image.
4991   * @param { number } sWidth - Target width of the image to crop.
4992   * @param { number } sHeight - Target height of the image to crop.
4993   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
4994   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
4995   * @param { number } dWidth - Width of the drawing area.
4996   * @param { number } dHeight - Height of the drawing area.
4997   * @syscap SystemCapability.ArkUI.ArkUI.Full
4998   * @since 9
4999   */
5000  /**
5001   * Draws an image.
5002   *
5003   * @param { image.PixelMap } image - Image resource.
5004   * @param { number } sx - X-coordinate of the upper left corner of the rectangle used to crop the source image.
5005   * @param { number } sy - Y-coordinate of the upper left corner of the rectangle used to crop the source image.
5006   * @param { number } sWidth - Target width of the image to crop.
5007   * @param { number } sHeight - Target height of the image to crop.
5008   * @param { number } dx - X-coordinate of the upper left corner of the drawing area on the canvas.
5009   * @param { number } dy - Y-coordinate of the upper left corner of the drawing area on the canvas.
5010   * @param { number } dWidth - Width of the drawing area.
5011   * @param { number } dHeight - Height of the drawing area.
5012   * @syscap SystemCapability.ArkUI.ArkUI.Full
5013   * @atomicservice
5014   * @since 11
5015   */
5016  drawImage(
5017    image: image.PixelMap,
5018    sx: number,
5019    sy: number,
5020    sWidth: number,
5021    sHeight: number,
5022    dx: number,
5023    dy: number,
5024    dWidth: number,
5025    dHeight: number,
5026  ): void;
5027
5028  /**
5029   * Restores the saved drawing context.
5030   *
5031   * @syscap SystemCapability.ArkUI.ArkUI.Full
5032   * @since 4
5033   */
5034  /**
5035   * Restores the saved drawing context.
5036   *
5037   * @syscap SystemCapability.ArkUI.ArkUI.Full
5038   * @atomicservice
5039   * @since 11
5040   */
5041  restore: () => void;
5042
5043  /**
5044   * Saves the current drawing context.
5045   *
5046   * @syscap SystemCapability.ArkUI.ArkUI.Full
5047   * @since 4
5048   */
5049  /**
5050   * Saves the current drawing context.
5051   *
5052   * @syscap SystemCapability.ArkUI.ArkUI.Full
5053   * @atomicservice
5054   * @since 11
5055   */
5056  save: () => void;
5057
5058  /**
5059   * Creates an ImageData object.
5060   *
5061   * @param { number } width - Width of the ImageData object.
5062   * @param { number } height - Height of the ImageData object.
5063   * @returns { ImageData } Returns the newly created FunctionCallable object.
5064   * @syscap SystemCapability.ArkUI.ArkUI.Full
5065   * @since 4
5066   */
5067  /**
5068   * Creates an ImageData object.
5069   *
5070   * @param { number } width - Width of the ImageData object.
5071   * @param { number } height - Height of the ImageData object.
5072   * @returns { ImageData } Returns the newly created FunctionCallable object.
5073   * @syscap SystemCapability.ArkUI.ArkUI.Full
5074   * @atomicservice
5075   * @since 11
5076   */
5077  createImageData(width: number, height: number): ImageData;
5078  /**
5079   * Creates an ImageData object.
5080   *
5081   * @param { ImageData } imagedata - ImageData object with the same width and height copied from the original ImageData object.
5082   * @returns { ImageData } Returns the newly created FunctionCallable object.
5083   * @syscap SystemCapability.ArkUI.ArkUI.Full
5084   * @since 4
5085   */
5086  /**
5087   * Creates an ImageData object.
5088   *
5089   * @param { ImageData } imagedata - ImageData object with the same width and height copied from the original ImageData object.
5090   * @returns { ImageData } Returns the newly created FunctionCallable object.
5091   * @syscap SystemCapability.ArkUI.ArkUI.Full
5092   * @atomicservice
5093   * @since 11
5094   */
5095  createImageData(imagedata: ImageData): ImageData;
5096
5097  /**
5098   * ImageData object created with pixels in the specified area on the canvas.
5099   *
5100   * @param { number } sx - X-coordinate of the upper left corner of the output area.
5101   * @param { number } sy - Y-coordinate of the upper left corner of the output area.
5102   * @param { number } sw - Width of the output area.
5103   * @param { number } sh - Height of the output area.
5104   * @returns { ImageData } ImageData object that contains pixels in the specified area on the canvas.
5105   * @syscap SystemCapability.ArkUI.ArkUI.Full
5106   * @since 4
5107   */
5108  /**
5109   * ImageData object created with pixels in the specified area on the canvas.
5110   *
5111   * @param { number } sx - X-coordinate of the upper left corner of the output area.
5112   * @param { number } sy - Y-coordinate of the upper left corner of the output area.
5113   * @param { number } sw - Width of the output area.
5114   * @param { number } sh - Height of the output area.
5115   * @returns { ImageData } ImageData object that contains pixels in the specified area on the canvas.
5116   * @syscap SystemCapability.ArkUI.ArkUI.Full
5117   * @atomicservice
5118   * @since 11
5119   */
5120  getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
5121
5122  /**
5123   * Get an PixelMap object.
5124   *
5125   * @param { number } sx - The upper-left x-coordinate of the rectangular area of the image data to be extracted.
5126   * @param { number } sy - The upper-left y coordinate of the rectangular region of the image data to be extracted.
5127   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
5128   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
5129   * @returns { image.PixelMap } PixelMap A PixelMap object that contains the rectangular ImageData given by the canvas.
5130   * @syscap SystemCapability.ArkUI.ArkUI.Full
5131   * @since 9
5132   */
5133  /**
5134   * Get an PixelMap object.
5135   *
5136   * @param { number } sx - The upper-left x-coordinate of the rectangular area of the image data to be extracted.
5137   * @param { number } sy - The upper-left y coordinate of the rectangular region of the image data to be extracted.
5138   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
5139   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
5140   * @returns { image.PixelMap } PixelMap A PixelMap object that contains the rectangular ImageData given by the canvas.
5141   * @syscap SystemCapability.ArkUI.ArkUI.Full
5142   * @atomicservice
5143   * @since 11
5144   */
5145  getPixelMap(sx: number, sy: number, sw: number, sh: number): image.PixelMap
5146
5147  /**
5148   * Puts the ImageData onto a rectangular area on the canvas.
5149   *
5150   * @param { ImageData } imageData - ImageData object with pixels to put onto the canvas.
5151   * @param { number } dx - X-axis offset of the rectangle area on the canvas.
5152   * @param { number } dy - Y-axis offset of the rectangle area on the canvas.
5153   * @syscap SystemCapability.ArkUI.ArkUI.Full
5154   * @since 4
5155   */
5156  /**
5157   * Puts the ImageData onto a rectangular area on the canvas.
5158   *
5159   * @param { ImageData } imageData - ImageData object with pixels to put onto the canvas.
5160   * @param { number } dx - X-axis offset of the rectangle area on the canvas.
5161   * @param { number } dy - Y-axis offset of the rectangle area on the canvas.
5162   * @syscap SystemCapability.ArkUI.ArkUI.Full
5163   * @atomicservice
5164   * @since 11
5165   */
5166  putImageData(imageData: ImageData, dx: number, dy: number): void;
5167
5168  /**
5169   * Puts the ImageData onto a rectangular area on the canvas.
5170   *
5171   * @param { ImageData } imageData - ImageData object with pixels to put onto the canvas.
5172   * @param { number } dx - X-axis offset of the rectangle area on the canvas.
5173   * @param { number } dy - Y-axis offset of the rectangle area on the canvas.
5174   * @param { number } dirtyX - X-axis offset of the upper left corner of the rectangle area relative to that of the source image.
5175   * @param { number } dirtyY - Y-axis offset of the upper left corner of the rectangle area relative to that of the source image.
5176   * @param { number } dirtyWidth - Width of the rectangle area to cop the source image.
5177   * @param { number } dirtyHeight - Height of the rectangle area to cop the source image.
5178   * @syscap SystemCapability.ArkUI.ArkUI.Full
5179   * @since 4
5180   */
5181  /**
5182   * Puts the ImageData onto a rectangular area on the canvas.
5183   *
5184   * @param { ImageData } imageData - ImageData object with pixels to put onto the canvas.
5185   * @param { number } dx - X-axis offset of the rectangle area on the canvas.
5186   * @param { number } dy - Y-axis offset of the rectangle area on the canvas.
5187   * @param { number } dirtyX - X-axis offset of the upper left corner of the rectangle area relative to that of the source image.
5188   * @param { number } dirtyY - Y-axis offset of the upper left corner of the rectangle area relative to that of the source image.
5189   * @param { number } dirtyWidth - Width of the rectangle area to cop the source image.
5190   * @param { number } dirtyHeight - Height of the rectangle area to cop the source image.
5191   * @syscap SystemCapability.ArkUI.ArkUI.Full
5192   * @atomicservice
5193   * @since 11
5194   */
5195  putImageData(
5196    imageData: ImageData,
5197    dx: number,
5198    dy: number,
5199    dirtyX: number,
5200    dirtyY: number,
5201    dirtyWidth: number,
5202    dirtyHeight: number,
5203  ): void;
5204
5205  /**
5206   * Sets the dash line style.
5207   *
5208   * @param { Array<number> } segments - Interval of alternate line segments and the length of spacing.
5209   * @syscap SystemCapability.ArkUI.ArkUI.Full
5210   * @since 4
5211   */
5212  /**
5213   * Sets the dash line style.
5214   *
5215   * @param { Array<number> } segments - Interval of alternate line segments and the length of spacing.
5216   * @syscap SystemCapability.ArkUI.ArkUI.Full
5217   * @atomicservice
5218   * @since 11
5219   */
5220  setLineDash(segments: Array<number>): void;
5221
5222  /**
5223   * Obtains the dash line style.
5224   *
5225   * @returns { Array<number> } Interval of alternate line segments and the length of spacing.
5226   * @syscap SystemCapability.ArkUI.ArkUI.Full
5227   * @since 4
5228   */
5229  /**
5230   * Obtains the dash line style.
5231   *
5232   * @returns { Array<number> } Interval of alternate line segments and the length of spacing.
5233   * @syscap SystemCapability.ArkUI.ArkUI.Full
5234   * @atomicservice
5235   * @since 11
5236   */
5237  getLineDash(): Array<number>;
5238
5239  /**
5240   * Sets the dash line offset.
5241   * Dash line offset. The value is a float number starting from 0.0.
5242   *
5243   * @type { number }
5244   * @syscap SystemCapability.ArkUI.ArkUI.Full
5245   * @since 4
5246   */
5247  /**
5248   * Sets the dash line offset.
5249   * Dash line offset. The value is a float number starting from 0.0.
5250   *
5251   * @type { number }
5252   * @syscap SystemCapability.ArkUI.ArkUI.Full
5253   * @atomicservice
5254   * @since 11
5255   */
5256  lineDashOffset: number;
5257
5258  /**
5259   * Sets the composite operation type.
5260   * source-over Default value. Displays the new drawing above the existing drawing.
5261   * source-atop Displays the new drawing on the top of the existing drawing.
5262   * source-in Displays the new drawing inside the existing drawing.
5263   * source-out Displays part of the new drawing that is outside of the existing drawing.
5264   * destination-over Displays the existing drawing above the new drawing.
5265   * destination-atop Displays the existing drawing above the new drawing.
5266   * destination-in Displays the existing drawing inside the new drawing.
5267   * destination-out Displays part of the existing drawing that is outside of the new drawing.
5268   * lighter Displays both the new drawing and the existing drawing.
5269   * copy Displays the new drawing and neglects the existing drawing.
5270   * xor Combines the new drawing and existing drawing using the XOR operation.
5271   *
5272   * @type { string }
5273   * @syscap SystemCapability.ArkUI.ArkUI.Full
5274   * @since 4
5275   */
5276  /**
5277   * Sets the composite operation type.
5278   * source-over Default value. Displays the new drawing above the existing drawing.
5279   * source-atop Displays the new drawing on the top of the existing drawing.
5280   * source-in Displays the new drawing inside the existing drawing.
5281   * source-out Displays part of the new drawing that is outside of the existing drawing.
5282   * destination-over Displays the existing drawing above the new drawing.
5283   * destination-atop Displays the existing drawing above the new drawing.
5284   * destination-in Displays the existing drawing inside the new drawing.
5285   * destination-out Displays part of the existing drawing that is outside of the new drawing.
5286   * lighter Displays both the new drawing and the existing drawing.
5287   * copy Displays the new drawing and neglects the existing drawing.
5288   * xor Combines the new drawing and existing drawing using the XOR operation.
5289   *
5290   * @type { string }
5291   * @syscap SystemCapability.ArkUI.ArkUI.Full
5292   * @atomicservice
5293   * @since 11
5294   */
5295  globalCompositeOperation: string;
5296
5297  /**
5298   * Sets the shadow blur degree.
5299   * Shadow blur degree. A larger value indicates a more blurred shadow. The value is of the float type, and the default value is 0.
5300   *
5301   * @type { number }
5302   * @syscap SystemCapability.ArkUI.ArkUI.Full
5303   * @since 4
5304   */
5305  /**
5306   * Sets the shadow blur degree.
5307   * Shadow blur degree. A larger value indicates a more blurred shadow. The value is of the float type, and the default value is 0.
5308   *
5309   * @type { number }
5310   * @syscap SystemCapability.ArkUI.ArkUI.Full
5311   * @atomicservice
5312   * @since 11
5313   */
5314  shadowBlur: number;
5315
5316  /**
5317   * Sets the shadow color.
5318   *
5319   * @type { string }
5320   * @syscap SystemCapability.ArkUI.ArkUI.Full
5321   * @since 4
5322   */
5323  /**
5324   * Sets the shadow color.
5325   *
5326   * @type { string }
5327   * @syscap SystemCapability.ArkUI.ArkUI.Full
5328   * @atomicservice
5329   * @since 11
5330   */
5331  shadowColor: string;
5332
5333  /**
5334   * Sets the x-axis shadow offset relative to the original object.
5335   * X-axis shadow offset relative to the original object.
5336   *
5337   * @type { number }
5338   * @syscap SystemCapability.ArkUI.ArkUI.Full
5339   * @since 4
5340   */
5341  /**
5342   * Sets the x-axis shadow offset relative to the original object.
5343   * X-axis shadow offset relative to the original object.
5344   *
5345   * @type { number }
5346   * @syscap SystemCapability.ArkUI.ArkUI.Full
5347   * @atomicservice
5348   * @since 11
5349   */
5350  shadowOffsetX: number;
5351
5352  /**
5353   * Sets the y-axis shadow offset relative to the original object.
5354   * Y-axis shadow offset relative to the original object.
5355   *
5356   * @type { number }
5357   * @syscap SystemCapability.ArkUI.ArkUI.Full
5358   * @since 4
5359   */
5360  /**
5361   * Sets the y-axis shadow offset relative to the original object.
5362   * Y-axis shadow offset relative to the original object.
5363   *
5364   * @type { number }
5365   * @syscap SystemCapability.ArkUI.ArkUI.Full
5366   * @atomicservice
5367   * @since 11
5368   */
5369  shadowOffsetY: number;
5370
5371  /**
5372   * Draws the Bitmap to the current canvas.
5373   *
5374   * @param { ImageBitmap } bitmap
5375   * @syscap SystemCapability.ArkUI.ArkUI.Full
5376   * @since 7
5377   */
5378  /**
5379   * Draws the Bitmap to the current canvas.
5380   *
5381   * @param { ImageBitmap } bitmap
5382   * @syscap SystemCapability.ArkUI.ArkUI.Full
5383   * @atomicservice
5384   * @since 11
5385   */
5386  transferFromImageBitmap(bitmap: ImageBitmap): void;
5387}
5388
5389/**
5390 * You can create a gradient object on the canvas by calling CanvasRenderingContext2D.createLinearGradient().
5391 *
5392 * @interface CanvasGradient
5393 * @syscap SystemCapability.ArkUI.ArkUI.Full
5394 * @since 4
5395 */
5396/**
5397 * You can create a gradient object on the canvas by calling CanvasRenderingContext2D.createLinearGradient().
5398 *
5399 * @interface CanvasGradient
5400 * @syscap SystemCapability.ArkUI.ArkUI.Full
5401 * @atomicservice
5402 * @since 11
5403 */
5404export interface CanvasGradient {
5405  /**
5406   * Adds a color stop for the CanvasGradient object based on the specified offset and gradient color.
5407   *
5408   * @param { number } offset - Proportion of the distance between the color stop and the start point to the total length.
5409   * The value ranges from 0 to 1.
5410   * @param { string } color - Sets the gradient color.
5411   * @syscap SystemCapability.ArkUI.ArkUI.Full
5412   * @since 4
5413   */
5414  /**
5415   * Adds a color stop for the CanvasGradient object based on the specified offset and gradient color.
5416   *
5417   * @param { number } offset - Proportion of the distance between the color stop and the start point to the total length.
5418   * The value ranges from 0 to 1.
5419   * @param { string } color - Sets the gradient color.
5420   * @syscap SystemCapability.ArkUI.ArkUI.Full
5421   * @atomicservice
5422   * @since 11
5423   */
5424  addColorStop(offset: number, color: string): void;
5425}
5426
5427/**
5428 * Path2D
5429 *
5430 * @interface Path2D
5431 * @syscap SystemCapability.ArkUI.ArkUI.Full
5432 * @since 4
5433 */
5434/**
5435 * Path2D
5436 *
5437 * @interface Path2D
5438 * @syscap SystemCapability.ArkUI.ArkUI.Full
5439 * @atomicservice
5440 * @since 11
5441 */
5442export interface Path2D {
5443  /**
5444   * Add another path to current path.
5445   *
5446   * @param { Path2D } path - another created Path2D object.
5447   * @syscap SystemCapability.ArkUI.ArkUI.Full
5448   * @since 4
5449   */
5450  /**
5451   * Add another path to current path.
5452   *
5453   * @param { Path2D } path - another created Path2D object.
5454   * @syscap SystemCapability.ArkUI.ArkUI.Full
5455   * @atomicservice
5456   * @since 11
5457   */
5458  addPath(path: Path2D): void;
5459
5460  /**
5461   * Uses same parameters as the transform() function to reset the existing transformation matrix and create a new transformation matrix.
5462   *
5463   * @param { number } scaleX - X-axis scale.
5464   * @param { number } skewX - X-axis skew.
5465   * @param { number } skewY - Y-axis skew.
5466   * @param { number } scaleY - Y-axis scale.
5467   * @param { number } translateX - X-axis translation.
5468   * @param { number } translateY - Y-axis translation.
5469   * @syscap SystemCapability.ArkUI.ArkUI.Full
5470   * @since 4
5471   */
5472  /**
5473   * Uses same parameters as the transform() function to reset the existing transformation matrix and create a new transformation matrix.
5474   *
5475   * @param { number } scaleX - X-axis scale.
5476   * @param { number } skewX - X-axis skew.
5477   * @param { number } skewY - Y-axis skew.
5478   * @param { number } scaleY - Y-axis scale.
5479   * @param { number } translateX - X-axis translation.
5480   * @param { number } translateY - Y-axis translation.
5481   * @syscap SystemCapability.ArkUI.ArkUI.Full
5482   * @atomicservice
5483   * @since 11
5484   */
5485  setTransform(
5486    scaleX: number,
5487    skewX: number,
5488    skewY: number,
5489    scaleY: number,
5490    translateX: number,
5491    translateY: number,
5492  ): void;
5493
5494  /**
5495   * Draws a closed path.
5496   *
5497   * @syscap SystemCapability.ArkUI.ArkUI.Full
5498   * @since 4
5499   */
5500  /**
5501   * Draws a closed path.
5502   *
5503   * @syscap SystemCapability.ArkUI.ArkUI.Full
5504   * @atomicservice
5505   * @since 11
5506   */
5507  closePath(): void;
5508
5509  /**
5510   * Moves a drawing path to a target position on the canvas.
5511   *
5512   * @param { number } x - X-coordinate of the target position.
5513   * @param { number } y - Y-coordinate of the target position.
5514   * @syscap SystemCapability.ArkUI.ArkUI.Full
5515   * @since 4
5516   */
5517  /**
5518   * Moves a drawing path to a target position on the canvas.
5519   *
5520   * @param { number } x - X-coordinate of the target position.
5521   * @param { number } y - Y-coordinate of the target position.
5522   * @syscap SystemCapability.ArkUI.ArkUI.Full
5523   * @atomicservice
5524   * @since 11
5525   */
5526  moveTo(x: number, y: number): void;
5527
5528  /**
5529   * Connects the current point to a target position using a straight line.
5530   *
5531   * @param { number } x - X-coordinate of the target position.
5532   * @param { number } y - Y-coordinate of the target position.
5533   * @syscap SystemCapability.ArkUI.ArkUI.Full
5534   * @since 4
5535   */
5536  /**
5537   * Connects the current point to a target position using a straight line.
5538   *
5539   * @param { number } x - X-coordinate of the target position.
5540   * @param { number } y - Y-coordinate of the target position.
5541   * @syscap SystemCapability.ArkUI.ArkUI.Full
5542   * @atomicservice
5543   * @since 11
5544   */
5545  lineTo(x: number, y: number): void;
5546
5547  /**
5548   * Draws a cubic bezier curve on the canvas.
5549   *
5550   * @param { number } cp1x - X-coordinate of the first parameter of the bezier curve.
5551   * @param { number } cp1y - Y-coordinate of the first parameter of the bezier curve.
5552   * @param { number } cp2x - X-coordinate of the second parameter of the bezier curve.
5553   * @param { number } cp2y - Y-coordinate of the second parameter of the bezier curve.
5554   * @param { number } x - End point x-coordinate of the bezier curve.
5555   * @param { number } y - End point y-coordinate of the bezier curve.
5556   * @syscap SystemCapability.ArkUI.ArkUI.Full
5557   * @since 4
5558   */
5559  /**
5560   * Draws a cubic bezier curve on the canvas.
5561   *
5562   * @param { number } cp1x - X-coordinate of the first parameter of the bezier curve.
5563   * @param { number } cp1y - Y-coordinate of the first parameter of the bezier curve.
5564   * @param { number } cp2x - X-coordinate of the second parameter of the bezier curve.
5565   * @param { number } cp2y - Y-coordinate of the second parameter of the bezier curve.
5566   * @param { number } x - End point x-coordinate of the bezier curve.
5567   * @param { number } y - End point y-coordinate of the bezier curve.
5568   * @syscap SystemCapability.ArkUI.ArkUI.Full
5569   * @atomicservice
5570   * @since 11
5571   */
5572  bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
5573
5574  /**
5575   * Draws a quadratic curve on the canvas.
5576   *
5577   * @param { number } cpx - X-coordinate of the bezier curve parameter.
5578   * @param { number } cpy - Y-coordinate of the bezier curve parameter.
5579   * @param { number } x - End point x-coordinate of the bezier curve.
5580   * @param { number } y - End point y-coordinate of the bezier curve.
5581   * @syscap SystemCapability.ArkUI.ArkUI.Full
5582   * @since 4
5583   */
5584  /**
5585   * Draws a quadratic curve on the canvas.
5586   *
5587   * @param { number } cpx - X-coordinate of the bezier curve parameter.
5588   * @param { number } cpy - Y-coordinate of the bezier curve parameter.
5589   * @param { number } x - End point x-coordinate of the bezier curve.
5590   * @param { number } y - End point y-coordinate of the bezier curve.
5591   * @syscap SystemCapability.ArkUI.ArkUI.Full
5592   * @atomicservice
5593   * @since 11
5594   */
5595  quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
5596
5597  /**
5598   * Draws an arc on the canvas.
5599   *
5600   * @param { number } x - X-coordinate of the center point of the arc.
5601   * @param { number } y - Y-coordinate of the center point of the arc.
5602   * @param { number } radius - Radius of the arc.
5603   * @param { number } startAngle - Start radian of the arc.
5604   * @param { number } endAngel - End radian of the arc.
5605   * @param { boolean } [anticlockwise] - Whether to draw the arc counterclockwise.
5606   * @syscap SystemCapability.ArkUI.ArkUI.Full
5607   * @since 4
5608   */
5609  /**
5610   * Draws an arc on the canvas.
5611   *
5612   * @param { number } x - X-coordinate of the center point of the arc.
5613   * @param { number } y - Y-coordinate of the center point of the arc.
5614   * @param { number } radius - Radius of the arc.
5615   * @param { number } startAngle - Start radian of the arc.
5616   * @param { number } endAngel - End radian of the arc.
5617   * @param { boolean } [anticlockwise] - Whether to draw the arc counterclockwise.
5618   * @syscap SystemCapability.ArkUI.ArkUI.Full
5619   * @atomicservice
5620   * @since 11
5621   */
5622  arc(x: number, y: number, radius: number, startAngle: number, endAngel: number, anticlockwise?: boolean): void;
5623
5624  /**
5625   * Draws an arc based on the radius and points on the arc.
5626   *
5627   * @param { number } x1 - X-coordinate of the first point on the arc.
5628   * @param { number } y1 - Y-coordinate of the first point on the arc.
5629   * @param { number } x2 - X-coordinate of the second point on the arc.
5630   * @param { number } y2 - Y-coordinate of the second point on the arc.
5631   * @param { number } radius - Radius of the arc.
5632   * @syscap SystemCapability.ArkUI.ArkUI.Full
5633   * @since 4
5634   */
5635  /**
5636   * Draws an arc based on the radius and points on the arc.
5637   *
5638   * @param { number } x1 - X-coordinate of the first point on the arc.
5639   * @param { number } y1 - Y-coordinate of the first point on the arc.
5640   * @param { number } x2 - X-coordinate of the second point on the arc.
5641   * @param { number } y2 - Y-coordinate of the second point on the arc.
5642   * @param { number } radius - Radius of the arc.
5643   * @syscap SystemCapability.ArkUI.ArkUI.Full
5644   * @atomicservice
5645   * @since 11
5646   */
5647  arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
5648
5649  /**
5650   * Draws an ellipse based on the coordinate and radius.
5651   *
5652   * @param { number } x - X-coordinate of the center point on the ellipse.
5653   * @param { number } y - Y-coordinate of the center point on the ellipse.
5654   * @param { number } radiusX - X-coordinate of the radius Length on the ellipse.
5655   * @param { number } radiusY - Y-coordinate of the radius Length on the ellipse.
5656   * @param { number } rotation - The rotation angle of the ellipse, in radians.
5657   * @param { number } startAngle - Angle of the start point for ellipse drawing.
5658   * @param { number } endAngle - End Point Angle for Ellipse Drawing.
5659   * @param { number } anticlockwise - Indicates whether to draw an ellipse counterclockwise.
5660   * 0: clockwise; 1: counterclockwise. The default value is 0.
5661   * @syscap SystemCapability.ArkUI.ArkUI.Full
5662   * @since 4
5663   */
5664  /**
5665   * Draws an ellipse based on the coordinate and radius.
5666   *
5667   * @param { number } x - X-coordinate of the center point on the ellipse.
5668   * @param { number } y - Y-coordinate of the center point on the ellipse.
5669   * @param { number } radiusX - X-coordinate of the radius Length on the ellipse.
5670   * @param { number } radiusY - Y-coordinate of the radius Length on the ellipse.
5671   * @param { number } rotation - The rotation angle of the ellipse, in radians.
5672   * @param { number } startAngle - Angle of the start point for ellipse drawing.
5673   * @param { number } endAngle - End Point Angle for Ellipse Drawing.
5674   * @param { number } anticlockwise - Indicates whether to draw an ellipse counterclockwise.
5675   * 0: clockwise; 1: counterclockwise. The default value is 0.
5676   * @syscap SystemCapability.ArkUI.ArkUI.Full
5677   * @atomicservice
5678   * @since 11
5679   */
5680  ellipse(
5681    x: number,
5682    y: number,
5683    radiusX: number,
5684    radiusY: number,
5685    rotation: number,
5686    startAngle: number,
5687    endAngle: number,
5688    anticlockwise?: number,
5689  ): void;
5690
5691  /**
5692   * Creates a rectangular.
5693   *
5694   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
5695   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
5696   * @param { number } width - Width of the rectangle.
5697   * @param { number } height - Height of the rectangle.
5698   * @syscap SystemCapability.ArkUI.ArkUI.Full
5699   * @since 4
5700   */
5701  /**
5702   * Creates a rectangular.
5703   *
5704   * @param { number } x - X-coordinate of the upper left corner of the rectangle.
5705   * @param { number } y - Y-coordinate of the upper left corner of the rectangle.
5706   * @param { number } width - Width of the rectangle.
5707   * @param { number } height - Height of the rectangle.
5708   * @syscap SystemCapability.ArkUI.ArkUI.Full
5709   * @atomicservice
5710   * @since 11
5711   */
5712  rect(x: number, y: number, width: number, height: number): void;
5713}
5714
5715/**
5716 * <canvas> provides a rectangular canvas component for drawing graphics on the screen.
5717 * You can control each pixel to draw on the canvas.
5718 * <canvas> offers a variety of functions for drawing paths, rectangles, circles, text, and allows for adding images to it.
5719 *
5720 * @interface CanvasElement
5721 * @syscap SystemCapability.ArkUI.ArkUI.Full
5722 * @since 4
5723 */
5724/**
5725 * <canvas> provides a rectangular canvas component for drawing graphics on the screen.
5726 * You can control each pixel to draw on the canvas.
5727 * <canvas> offers a variety of functions for drawing paths, rectangles, circles, text, and allows for adding images to it.
5728 *
5729 * @interface CanvasElement
5730 * @syscap SystemCapability.ArkUI.ArkUI.Full
5731 * @atomicservice
5732 * @since 11
5733 */
5734export interface CanvasElement extends Element {
5735  /**
5736   * Obtains the context of 2D canvas drawing.
5737   * Only parameters related to 2D canvas drawing are supported.
5738   * The return value is a 2D drawing object that provides specific 2D drawing operations.
5739   *
5740   * @param { "2d" } type - identifier defining the drawing context associated to the canvas.
5741   * @param { ContextAttrOptions } [options] - use this context attributes to creating rendering context.
5742   * @returns { CanvasRenderingContext2D }
5743   * @syscap SystemCapability.ArkUI.ArkUI.Full
5744   * @since 4
5745   */
5746  /**
5747   * Obtains the context of 2D canvas drawing.
5748   * Only parameters related to 2D canvas drawing are supported.
5749   * The return value is a 2D drawing object that provides specific 2D drawing operations.
5750   *
5751   * @param { "2d" } type - identifier defining the drawing context associated to the canvas.
5752   * @param { ContextAttrOptions } [options] - use this context attributes to creating rendering context.
5753   * @returns { CanvasRenderingContext2D }
5754   * @syscap SystemCapability.ArkUI.ArkUI.Full
5755   * @atomicservice
5756   * @since 11
5757   */
5758  getContext(type: "2d", options?: ContextAttrOptions): CanvasRenderingContext2D;
5759
5760  /**
5761   * Obtains the context of webgl canvas drawing.
5762   * Only parameters related to webgl canvas drawing are supported.
5763   * The return value is a webgl drawing object that provides specific webgl drawing operations.
5764   *
5765   * @param { "webgl" } type - identifier defining the drawing context associated to the canvas.
5766   * @param { WebGLContextAttributes } [options] - use this context attributes to creating rendering context.
5767   * @returns { WebGLRenderingContext }
5768   * @syscap SystemCapability.ArkUI.ArkUI.Full
5769   * @since 6
5770   */
5771  /**
5772   * Obtains the context of webgl canvas drawing.
5773   * Only parameters related to webgl canvas drawing are supported.
5774   * The return value is a webgl drawing object that provides specific webgl drawing operations.
5775   *
5776   * @param { "webgl" } type - identifier defining the drawing context associated to the canvas.
5777   * @param { WebGLContextAttributes } [options] - use this context attributes to creating rendering context.
5778   * @returns { WebGLRenderingContext }
5779   * @syscap SystemCapability.ArkUI.ArkUI.Full
5780   * @atomicservice
5781   * @since 11
5782   */
5783  getContext(type: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext;
5784
5785  /**
5786   * Obtains the context of webgl2 canvas drawing.
5787   * Only parameters related to webgl2 canvas drawing are supported.
5788   * The return value is a webgl2 drawing object that provides specific webgl2 drawing operations.
5789   *
5790   * @param { "webgl2" } type - identifier defining the drawing context associated to the canvas.
5791   * @param { WebGLContextAttributes } [options] - use this context attributes to creating rendering context.
5792   * @returns { WebGL2RenderingContext }
5793   * @syscap SystemCapability.ArkUI.ArkUI.Full
5794   * @since 4
5795   */
5796  /**
5797   * Obtains the context of webgl2 canvas drawing.
5798   * Only parameters related to webgl2 canvas drawing are supported.
5799   * The return value is a webgl2 drawing object that provides specific webgl2 drawing operations.
5800   *
5801   * @param { "webgl2" } type - identifier defining the drawing context associated to the canvas.
5802   * @param { WebGLContextAttributes } [options] - use this context attributes to creating rendering context.
5803   * @returns { WebGL2RenderingContext }
5804   * @syscap SystemCapability.ArkUI.ArkUI.Full
5805   * @atomicservice
5806   * @since 11
5807   */
5808  getContext(type: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext;
5809
5810  /**
5811   * Creates a data URI that contains the image display.
5812   *
5813   * @param { string } type - A DOMString indicating the image format. The default type is image/png.
5814   * @param { number } [quality] - A Number between 0 and 1 indicating image quality if the type option
5815   * is image/jpeg or image/webp. If this argument is anything else,
5816   * the default value for image quality is used. Other arguments are ignored.
5817   * @returns { string }
5818   * @syscap SystemCapability.ArkUI.ArkUI.Full
5819   * @since 4
5820   */
5821  /**
5822   * Creates a data URI that contains the image display.
5823   *
5824   * @param { string } type - A DOMString indicating the image format. The default type is image/png.
5825   * @param { number } [quality] - A Number between 0 and 1 indicating image quality if the type option
5826   * is image/jpeg or image/webp. If this argument is anything else,
5827   * the default value for image quality is used. Other arguments are ignored.
5828   * @returns { string }
5829   * @syscap SystemCapability.ArkUI.ArkUI.Full
5830   * @atomicservice
5831   * @since 11
5832   */
5833  toDataURL(type?: string, quality?: number): string;
5834}
5835
5836/**
5837 * ScrollOptions
5838 *
5839 * @interface ScrollOptions
5840 * @syscap SystemCapability.ArkUI.ArkUI.Full
5841 * @since 6
5842 */
5843/**
5844 * ScrollOptions
5845 *
5846 * @interface ScrollOptions
5847 * @syscap SystemCapability.ArkUI.ArkUI.Full
5848 * @atomicservice
5849 * @since 11
5850 */
5851export interface ScrollOptions {
5852  /**
5853   * Scroll to the target position of the page. Unit: px
5854   *
5855   * @type { number }
5856   * @syscap SystemCapability.ArkUI.ArkUI.Full
5857   * @since 6
5858   */
5859  /**
5860   * Scroll to the target position of the page. Unit: px
5861   *
5862   * @type { number }
5863   * @syscap SystemCapability.ArkUI.ArkUI.Full
5864   * @atomicservice
5865   * @since 11
5866   */
5867  position: number;
5868
5869  /**
5870   * Duration of the scrolling animation, in ms.
5871   *
5872   * @type { number }
5873   * @syscap SystemCapability.ArkUI.ArkUI.Full
5874   * @since 6
5875   */
5876  /**
5877   * Duration of the scrolling animation, in ms.
5878   *
5879   * @type { number }
5880   * @syscap SystemCapability.ArkUI.ArkUI.Full
5881   * @atomicservice
5882   * @since 11
5883   */
5884  duration: number;
5885
5886  /**
5887   * The selector for current scroll.
5888   *
5889   * @type { ?string }
5890   * @syscap SystemCapability.ArkUI.ArkUI.Full
5891   * @since 6
5892   */
5893  /**
5894   * The selector for current scroll.
5895   *
5896   * @type { ?string }
5897   * @syscap SystemCapability.ArkUI.ArkUI.Full
5898   * @atomicservice
5899   * @since 11
5900   */
5901  id?: string;
5902
5903  /**
5904   * The timing function for current scroll animation.
5905   *
5906   * @type { ?string }
5907   * @syscap SystemCapability.ArkUI.ArkUI.Full
5908   * @since 6
5909   */
5910  /**
5911   * The timing function for current scroll animation.
5912   *
5913   * @type { ?string }
5914   * @syscap SystemCapability.ArkUI.ArkUI.Full
5915   * @atomicservice
5916   * @since 11
5917   */
5918  timingFunction?: string;
5919
5920  /**
5921   * Callback function for successful interface invocation.
5922   *
5923   * @type { ?function }
5924   * @syscap SystemCapability.ArkUI.ArkUI.Full
5925   * @since 6
5926   */
5927  /**
5928   * Callback function for successful interface invocation.
5929   *
5930   * @type { ?function }
5931   * @syscap SystemCapability.ArkUI.ArkUI.Full
5932   * @atomicservice
5933   * @since 11
5934   */
5935  success?: (result: Object) => void;
5936
5937  /**
5938   * Callback function for interface invocation failure.
5939   *
5940   * @type { ?function }
5941   * @syscap SystemCapability.ArkUI.ArkUI.Full
5942   * @since 6
5943   */
5944  /**
5945   * Callback function for interface invocation failure.
5946   *
5947   * @type { ?function }
5948   * @syscap SystemCapability.ArkUI.ArkUI.Full
5949   * @atomicservice
5950   * @since 11
5951   */
5952  fail?: (result: Object) => void;
5953
5954  /**
5955   * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully).
5956   *
5957   * @type { ?function }
5958   * @syscap SystemCapability.ArkUI.ArkUI.Full
5959   * @since 6
5960   */
5961  /**
5962   * Callback function at the end of the interface invoking (executed both successfully and unsuccessfully).
5963   *
5964   * @type { ?function }
5965   * @syscap SystemCapability.ArkUI.ArkUI.Full
5966   * @atomicservice
5967   * @since 11
5968   */
5969  complete?: (result: Object) => void;
5970}
5971
5972/**
5973 * ScrollOffset
5974 *
5975 * @interface ScrollOffset
5976 * @syscap SystemCapability.ArkUI.ArkUI.Full
5977 * @since 6
5978 */
5979/**
5980 * ScrollOffset
5981 *
5982 * @interface ScrollOffset
5983 * @syscap SystemCapability.ArkUI.ArkUI.Full
5984 * @atomicservice
5985 * @since 11
5986 */
5987export interface ScrollOffset {
5988  /**
5989   * Scrolling offset in the x-axis, in px.
5990   *
5991   * @type { number }
5992   * @syscap SystemCapability.ArkUI.ArkUI.Full
5993   * @since 6
5994   */
5995  /**
5996   * Scrolling offset in the x-axis, in px.
5997   *
5998   * @type { number }
5999   * @syscap SystemCapability.ArkUI.ArkUI.Full
6000   * @atomicservice
6001   * @since 11
6002   */
6003  x: number;
6004
6005  /**
6006   * Scrolling offset in the y-axis, in px.
6007   *
6008   * @type { number }
6009   * @syscap SystemCapability.ArkUI.ArkUI.Full
6010   * @since 6
6011   */
6012  /**
6013   * Scrolling offset in the y-axis, in px.
6014   *
6015   * @type { number }
6016   * @syscap SystemCapability.ArkUI.ArkUI.Full
6017   * @atomicservice
6018   * @since 11
6019   */
6020  y: number;
6021}
6022
6023/**
6024 * The <div> component provides a div container.
6025 *
6026 * @interface DivElement
6027 * @syscap SystemCapability.ArkUI.ArkUI.Full
6028 * @since 6
6029 */
6030/**
6031 * The <div> component provides a div container.
6032 *
6033 * @interface DivElement
6034 * @syscap SystemCapability.ArkUI.ArkUI.Full
6035 * @atomicservice
6036 * @since 11
6037 */
6038export interface DivElement extends Element {
6039  /**
6040   * Scrolls the div for a certain distance.
6041   *
6042   * @param { ScrollParam } data
6043   * @syscap SystemCapability.ArkUI.ArkUI.Full
6044   * @since 6
6045   */
6046  /**
6047   * Scrolls the div for a certain distance.
6048   *
6049   * @param { ScrollParam } data
6050   * @syscap SystemCapability.ArkUI.ArkUI.Full
6051   * @atomicservice
6052   * @since 11
6053   */
6054  scrollBy(data: ScrollParam): void;
6055
6056  /**
6057   * Returns the offset of the current scrolling. The return value type is Object.
6058   *
6059   * @returns { ScrollOffset }
6060   * @syscap SystemCapability.ArkUI.ArkUI.Full
6061   * @since 6
6062   */
6063  /**
6064   * Returns the offset of the current scrolling. The return value type is Object.
6065   *
6066   * @returns { ScrollOffset }
6067   * @syscap SystemCapability.ArkUI.ArkUI.Full
6068   * @atomicservice
6069   * @since 11
6070   */
6071  getScrollOffset(): ScrollOffset;
6072}
6073
6074/**
6075 * Application
6076 *
6077 * @interface Application
6078 * @syscap SystemCapability.ArkUI.ArkUI.Full
6079 * @since 4
6080 */
6081/**
6082 * Application
6083 *
6084 * @interface Application
6085 * @syscap SystemCapability.ArkUI.ArkUI.Full
6086 * @atomicservice
6087 * @since 11
6088 */
6089export interface Application {
6090  /**
6091   * Object that is exposed in the app.js file and obtained by this.$app.$def.
6092   *
6093   * @type { any }
6094   * @syscap SystemCapability.ArkUI.ArkUI.Full
6095   * @since 4
6096   */
6097  /**
6098   * Object that is exposed in the app.js file and obtained by this.$app.$def.
6099   *
6100   * @type { any }
6101   * @syscap SystemCapability.ArkUI.ArkUI.Full
6102   * @atomicservice
6103   * @since 11
6104   */
6105  $def: any;
6106}
6107
6108/**
6109 * ViewModel
6110 *
6111 * @interface ViewModel
6112 * @syscap SystemCapability.ArkUI.ArkUI.Full
6113 * @since 4
6114 */
6115/**
6116 * ViewModel
6117 *
6118 * @interface ViewModel
6119 * @syscap SystemCapability.ArkUI.ArkUI.Full
6120 * @atomicservice
6121 * @since 11
6122 */
6123export interface ViewModel {
6124  /**
6125   * Object that is exposed in the app.js file and obtained by this.$app
6126   *
6127   * @type  { Application }
6128   * @syscap SystemCapability.ArkUI.ArkUI.Full
6129   * @since 4
6130   */
6131  /**
6132   * Object that is exposed in the app.js file and obtained by this.$app
6133   *
6134   * @type  { Application }
6135   * @syscap SystemCapability.ArkUI.ArkUI.Full
6136   * @atomicservice
6137   * @since 11
6138   */
6139  $app: Application;
6140
6141  /**
6142   * Sets the parameters based on the system language, for example, this.$t('strings.hello').
6143   *
6144   * @param { string } path - Path of the language resource key.
6145   * @param { object | Array<any> } [params] - Content used to replace placeholders during runtime.
6146   * @returns { string } Content.
6147   * There are two types of placeholders available:Named placeholder, for example, {name}.
6148   * The actual content must be of the object type, for example, $t('strings.object', { name: 'Hello world' }).
6149   * Digit placeholder, for example, {0}. The actual content must be of the array type, for example, $t('strings.array', ['Hello world'].
6150   * @syscap SystemCapability.ArkUI.ArkUI.Lite
6151   * @since 4
6152   */
6153  /**
6154   * Sets the parameters based on the system language, for example, this.$t('strings.hello').
6155   *
6156   * @param { string } path - Path of the language resource key.
6157   * @param { object | Array<any> } [params] - Content used to replace placeholders during runtime.
6158   * @returns { string } Content.
6159   * There are two types of placeholders available:Named placeholder, for example, {name}.
6160   * The actual content must be of the object type, for example, $t('strings.object', { name: 'Hello world' }).
6161   * Digit placeholder, for example, {0}. The actual content must be of the array type, for example, $t('strings.array', ['Hello world'].
6162   * @syscap SystemCapability.ArkUI.ArkUI.Lite
6163   * @atomicservice
6164   * @since 11
6165   */
6166  $t(path: string, params?: object | Array<any>): string;
6167
6168  /**
6169   * Converse between singular and plural forms based on the system language, for example, this.$tc('strings.plurals').
6170   * NOTE
6171   * The resource content is distinguished by the following JSON keys: zero, one, two, few, many, and other.
6172   *
6173   * @param { string } path - Resource file path.
6174   * @param { number } count - Value.
6175   * @returns { string } Content.
6176   * @syscap SystemCapability.ArkUI.ArkUI.Full
6177   * @since 4
6178   */
6179  /**
6180   * Converse between singular and plural forms based on the system language, for example, this.$tc('strings.plurals').
6181   * NOTE
6182   * The resource content is distinguished by the following JSON keys: zero, one, two, few, many, and other.
6183   *
6184   * @param { string } path - Resource file path.
6185   * @param { number } count - Value.
6186   * @returns { string } Content.
6187   * @syscap SystemCapability.ArkUI.ArkUI.Full
6188   * @atomicservice
6189   * @since 11
6190   */
6191  $tc(path: string, count: number): string;
6192
6193  /**
6194   * Replace the resource path based on the DPI of the current device: this.$r('image.tv').
6195   *
6196   * @param { string } path - Resource file path.
6197   * @returns { string } Content.
6198   * @syscap SystemCapability.ArkUI.ArkUI.Full
6199   * @since 4
6200   */
6201  /**
6202   * Replace the resource path based on the DPI of the current device: this.$r('image.tv').
6203   *
6204   * @param { string } path - Resource file path.
6205   * @returns { string } Content.
6206   * @syscap SystemCapability.ArkUI.ArkUI.Full
6207   * @atomicservice
6208   * @since 11
6209   */
6210  $r(path: string): string;
6211
6212  /**
6213   * Adds an attribute or modifies an existing attribute.
6214   * Usage: this.$set('key',value): Add an attribute.
6215   *
6216   * @param { string } key
6217   * @param { any } value
6218   * @syscap SystemCapability.ArkUI.ArkUI.Full
6219   * @since 4
6220   */
6221  /**
6222   * Adds an attribute or modifies an existing attribute.
6223   * Usage: this.$set('key',value): Add an attribute.
6224   *
6225   * @param { string } key
6226   * @param { any } value
6227   * @syscap SystemCapability.ArkUI.ArkUI.Full
6228   * @atomicservice
6229   * @since 11
6230   */
6231  $set(key: string, value: any): void;
6232
6233  /**
6234   * Deletes an attribute.
6235   * Usage:this.$delete('key'): Delete an attribute.
6236   *
6237   * @param { string } key
6238   * @syscap SystemCapability.ArkUI.ArkUI.Full
6239   * @since 4
6240   */
6241  /**
6242   * Deletes an attribute.
6243   * Usage:this.$delete('key'): Delete an attribute.
6244   *
6245   * @param { string } key
6246   * @syscap SystemCapability.ArkUI.ArkUI.Full
6247   * @atomicservice
6248   * @since 11
6249   */
6250  $delete(key: string): void;
6251
6252  /**
6253   * Obtains the component with a specified ID. If no ID is specified, the root component is returned.
6254   * Usage:
6255   * <div id='xxx'></div>
6256   * this.$element('xxx'): Obtain the component whose ID is xxx.
6257   * this.$element(): Obtain the root component.
6258   *
6259   * @param { string } [id] - Component ID.
6260   * @returns {AnimationElement &CanvasElement &
6261   * object &WebElement &CameraElement &ListElement &
6262   * SwiperElement &DialogElement &ImageAnimatorElement &
6263   * MarqueeElement &MenuElement &ChartElement &InputElement &
6264   * ButtonElement &TextAreaElement &PickerElement &VideoElement &DivElement}
6265   * @syscap SystemCapability.ArkUI.ArkUI.Full
6266   * @since 4
6267   */
6268  /**
6269   * Obtains the component with a specified ID. If no ID is specified, the root component is returned.
6270   * Usage:
6271   * <div id='xxx'></div>
6272   * this.$element('xxx'): Obtain the component whose ID is xxx.
6273   * this.$element(): Obtain the root component.
6274   *
6275   * @param { string } [id] - Component ID.
6276   * @returns {AnimationElement &CanvasElement &
6277   * object &WebElement &CameraElement &ListElement &
6278   * SwiperElement &DialogElement &ImageAnimatorElement &
6279   * MarqueeElement &MenuElement &ChartElement &InputElement &
6280   * ButtonElement &TextAreaElement &PickerElement &VideoElement &DivElement}
6281   * @syscap SystemCapability.ArkUI.ArkUI.Full
6282   * @atomicservice
6283   * @since 11
6284   */
6285  $element(
6286    id?: string,
6287  ): AnimationElement &
6288    CanvasElement &
6289    object &
6290    WebElement &
6291    CameraElement &
6292    ListElement &
6293    SwiperElement &
6294    DialogElement &
6295    ImageAnimatorElement &
6296    MarqueeElement &
6297    MenuElement &
6298    ChartElement &
6299    InputElement &
6300    ButtonElement &
6301    TextAreaElement &
6302    PickerElement &
6303    VideoElement &
6304    DivElement;
6305
6306  /**
6307   * Obtains the root ViewModel instance.
6308   *
6309   * @returns { ViewModel & object }
6310   * @syscap SystemCapability.ArkUI.ArkUI.Full
6311   * @since 4
6312   */
6313  /**
6314   * Obtains the root ViewModel instance.
6315   *
6316   * @returns { ViewModel & object }
6317   * @syscap SystemCapability.ArkUI.ArkUI.Full
6318   * @atomicservice
6319   * @since 11
6320   */
6321  $root(): ViewModel & object;
6322
6323  /**
6324   * Obtains the parent ViewModel instance.
6325   *
6326   * @returns { ViewModel & object }
6327   * @syscap SystemCapability.ArkUI.ArkUI.Full
6328   * @since 4
6329   */
6330  /**
6331   * Obtains the parent ViewModel instance.
6332   *
6333   * @returns { ViewModel & object }
6334   * @syscap SystemCapability.ArkUI.ArkUI.Full
6335   * @atomicservice
6336   * @since 11
6337   */
6338  $parent(): ViewModel & object;
6339
6340  /**
6341   * Obtains the ViewModel instance of a custom child component with a specified ID.
6342   * Usage:this.$child('xxx'): Obtain the ViewModel instance of a custom child component whose ID is xxx.
6343   *
6344   * @param { string } id - Component ID.
6345   * @returns { ViewModel & object }
6346   * @syscap SystemCapability.ArkUI.ArkUI.Full
6347   * @since 4
6348   */
6349  /**
6350   * Obtains the ViewModel instance of a custom child component with a specified ID.
6351   * Usage:this.$child('xxx'): Obtain the ViewModel instance of a custom child component whose ID is xxx.
6352   *
6353   * @param { string } id - Component ID.
6354   * @returns { ViewModel & object }
6355   * @syscap SystemCapability.ArkUI.ArkUI.Full
6356   * @atomicservice
6357   * @since 11
6358   */
6359  $child(id: string): ViewModel & object;
6360
6361  /**
6362   * Listens for attribute changes. If the value of the data attribute changes, the bound event is triggered.
6363   *
6364   * @param { string } data - Attribute.
6365   * @param { string } callback - Function name.
6366   * @syscap SystemCapability.ArkUI.ArkUI.Full
6367   * @since 4
6368   */
6369  /**
6370   * Listens for attribute changes. If the value of the data attribute changes, the bound event is triggered.
6371   *
6372   * @param { string } data - Attribute.
6373   * @param { string } callback - Function name.
6374   * @syscap SystemCapability.ArkUI.ArkUI.Full
6375   * @atomicservice
6376   * @since 11
6377   */
6378  $watch(data: string, callback: string): void;
6379
6380  /**
6381   * An object that holds all DOM elements and component instances that have been registered with the refs attribute.
6382   *
6383   * @type { ElementReferences }
6384   * @syscap SystemCapability.ArkUI.ArkUI.Lite
6385   * @since 4
6386   */
6387  /**
6388   * An object that holds all DOM elements and component instances that have been registered with the refs attribute.
6389   *
6390   * @type { ElementReferences }
6391   * @syscap SystemCapability.ArkUI.ArkUI.Lite
6392   * @atomicservice
6393   * @since 11
6394   */
6395  $refs: ElementReferences;
6396
6397  /**
6398   * Custom events.
6399   *
6400   * @param { string } event - The name of event.
6401   * @param { object } [params] - The params of event.
6402   * @syscap SystemCapability.ArkUI.ArkUI.Full
6403   * @since 4
6404   */
6405  /**
6406   * Custom events.
6407   *
6408   * @param { string } event - The name of event.
6409   * @param { object } [params] - The params of event.
6410   * @syscap SystemCapability.ArkUI.ArkUI.Full
6411   * @atomicservice
6412   * @since 11
6413   */
6414  $emit(event: string, params?: object): void;
6415
6416  /**
6417   * Scroll the page to the destination.
6418   *
6419   * @param { ScrollOptions } options - The properties of event.
6420   * @syscap SystemCapability.ArkUI.ArkUI.Full
6421   * @since 6
6422   */
6423  /**
6424   * Scroll the page to the destination.
6425   *
6426   * @param { ScrollOptions } options - The properties of event.
6427   * @syscap SystemCapability.ArkUI.ArkUI.Full
6428   * @atomicservice
6429   * @since 11
6430   */
6431  scrollTo(options: ScrollOptions): void;
6432}
6433
6434/**
6435 * ElementReferences
6436 *
6437 * @interface ElementReferences
6438 * @syscap SystemCapability.ArkUI.ArkUI.Full
6439 * @since 4
6440 */
6441/**
6442 * ElementReferences
6443 *
6444 * @interface ElementReferences
6445 * @syscap SystemCapability.ArkUI.ArkUI.Full
6446 * @atomicservice
6447 * @since 11
6448 */
6449export interface ElementReferences {
6450  [k: string]: AnimationElement &
6451  CanvasElement &
6452  object &
6453  WebElement &
6454  CameraElement &
6455  ListElement &
6456  SwiperElement &
6457  DialogElement &
6458  ImageAnimatorElement &
6459  MarqueeElement &
6460  MenuElement &
6461  ChartElement &
6462  InputElement &
6463  ButtonElement &
6464  TextAreaElement &
6465  PickerElement &
6466  VideoElement &
6467  DivElement;
6468}
6469
6470/**
6471 * @syscap SystemCapability.ArkUI.ArkUI.Full
6472 * @since 4
6473 */
6474/**
6475 * @syscap SystemCapability.ArkUI.ArkUI.Full
6476 * @atomicservice
6477 * @since 11
6478 */
6479export declare class Locate {
6480  /**
6481   * language, such as 'zh'.
6482   *
6483   * @type { string }
6484   * @syscap SystemCapability.ArkUI.ArkUI.Full
6485   * @since 4
6486   */
6487  /**
6488   * language, such as 'zh'.
6489   *
6490   * @type { string }
6491   * @syscap SystemCapability.ArkUI.ArkUI.Full
6492   * @atomicservice
6493   * @since 11
6494   */
6495  language: string;
6496
6497  /**
6498   * country or region, such ass 'CN'.
6499   *
6500   * @type { string }
6501   * @syscap SystemCapability.ArkUI.ArkUI.Full
6502   * @since 4
6503   */
6504  /**
6505   * country or region, such ass 'CN'.
6506   *
6507   * @type { string }
6508   * @syscap SystemCapability.ArkUI.ArkUI.Full
6509   * @atomicservice
6510   * @since 11
6511   */
6512  countryOrRegion: string;
6513
6514  /**
6515   * text layout direction, ltr or rtl.
6516   *
6517   * @type { "ltr" | "rtl" }
6518   * @syscap SystemCapability.ArkUI.ArkUI.Full
6519   * @since 4
6520   */
6521  /**
6522   * text layout direction, ltr or rtl.
6523   *
6524   * @type { "ltr" | "rtl" }
6525   * @syscap SystemCapability.ArkUI.ArkUI.Full
6526   * @atomicservice
6527   * @since 11
6528   */
6529  dir: "ltr" | "rtl";
6530
6531  /**
6532   * The Unicode locale key set defined by the locale. If this locale does not have a specific key set, an empty set is
6533   * returned. For example: {"nu": "arab"}, which means that the numbers in the current environment use Arabic numbers.
6534   *
6535   * @syscap SystemCapability.ArkUI.ArkUI.Full
6536   * @since 5
6537   */
6538  /**
6539   * The Unicode locale key set defined by the locale. If this locale does not have a specific key set, an empty set is
6540   * returned. For example: {"nu": "arab"}, which means that the numbers in the current environment use Arabic numbers.
6541   *
6542   * @syscap SystemCapability.ArkUI.ArkUI.Full
6543   * @atomicservice
6544   * @since 11
6545   */
6546  unicodeSetting: object;
6547}
6548
6549/**
6550 * @syscap SystemCapability.ArkUI.ArkUI.Full
6551 * @since 6
6552 */
6553/**
6554 * @syscap SystemCapability.ArkUI.ArkUI.Full
6555 * @atomicservice
6556 * @since 11
6557 */
6558export declare class Configuration {
6559  /**
6560   * Internationalization related information, such as language, country, text layout direction, etc.
6561   *
6562   * @type { Locate }
6563   * @syscap SystemCapability.ArkUI.ArkUI.Full
6564   * @since 6
6565   */
6566  /**
6567   * Internationalization related information, such as language, country, text layout direction, etc.
6568   *
6569   * @type { Locate }
6570   * @syscap SystemCapability.ArkUI.ArkUI.Full
6571   * @atomicservice
6572   * @since 11
6573   */
6574  locate: Locate;
6575
6576  /**
6577   * The magnification of the current system font.
6578   *
6579   * @type { number }
6580   * @syscap SystemCapability.ArkUI.ArkUI.Full
6581   * @since 6
6582   */
6583  /**
6584   * The magnification of the current system font.
6585   *
6586   * @type { number }
6587   * @syscap SystemCapability.ArkUI.ArkUI.Full
6588   * @atomicservice
6589   * @since 11
6590   */
6591  fontScale: number;
6592}
6593
6594/**
6595 * Options
6596 *
6597 * @interface Options
6598 * @syscap SystemCapability.ArkUI.ArkUI.Full
6599 * @since 4
6600 */
6601/**
6602 * Options
6603 *
6604 * @interface Options
6605 * @syscap SystemCapability.ArkUI.ArkUI.Full
6606 * @atomicservice
6607 * @since 11
6608 */
6609export interface Options<T extends ViewModel, Data = DefaultData<T>> {
6610  /**
6611   * Data model of the page that can be converted into a JSON object.
6612   * The attribute name cannot start with $ or an underscore (_) or contain the reserved words such as for, if, show, and tid.
6613   * For a function, the return value must be an object.
6614   * Set the value of data to the return value of the function during page initialization.
6615   *
6616   * @type { ?Data }
6617   * @syscap SystemCapability.ArkUI.ArkUI.Lite
6618   * @since 4
6619   */
6620  /**
6621   * Data model of the page that can be converted into a JSON object.
6622   * The attribute name cannot start with $ or an underscore (_) or contain the reserved words such as for, if, show, and tid.
6623   * For a function, the return value must be an object.
6624   * Set the value of data to the return value of the function during page initialization.
6625   *
6626   * @type { ?Data }
6627   * @syscap SystemCapability.ArkUI.ArkUI.Lite
6628   * @atomicservice
6629   * @since 11
6630   */
6631  data?: Data;
6632
6633  /**
6634   * Listens for page initialization.
6635   * Called when page initialization is complete. This function is called only once in a lifecycle.
6636   *
6637   * @syscap SystemCapability.ArkUI.ArkUI.Full
6638   * @since 4
6639   */
6640  /**
6641   * Listens for page initialization.
6642   * Called when page initialization is complete. This function is called only once in a lifecycle.
6643   *
6644   * @syscap SystemCapability.ArkUI.ArkUI.Full
6645   * @atomicservice
6646   * @since 11
6647   */
6648  onInit?(): void;
6649
6650  /**
6651   * Listens for page creation.
6652   * Called when a page is created. This function is called only once in a lifecycle.
6653   *
6654   * @syscap SystemCapability.ArkUI.ArkUI.Full
6655   * @since 4
6656   */
6657  /**
6658   * Listens for page creation.
6659   * Called when a page is created. This function is called only once in a lifecycle.
6660   *
6661   * @syscap SystemCapability.ArkUI.ArkUI.Full
6662   * @atomicservice
6663   * @since 11
6664   */
6665  onReady?(): void;
6666
6667  /**
6668   * Listens for page display.
6669   * Called when the page is displayed.
6670   *
6671   * @syscap SystemCapability.ArkUI.ArkUI.Full
6672   * @since 4
6673   */
6674  /**
6675   * Listens for page display.
6676   * Called when the page is displayed.
6677   *
6678   * @syscap SystemCapability.ArkUI.ArkUI.Full
6679   * @atomicservice
6680   * @since 11
6681   */
6682  onShow?(): void;
6683
6684  /**
6685   * Listens for page hiding.
6686   * Called when the page disappears.
6687   *
6688   * @syscap SystemCapability.ArkUI.ArkUI.Full
6689   * @since 4
6690   */
6691  /**
6692   * Listens for page hiding.
6693   * Called when the page disappears.
6694   *
6695   * @syscap SystemCapability.ArkUI.ArkUI.Full
6696   * @atomicservice
6697   * @since 11
6698   */
6699  onHide?(): void;
6700
6701  /**
6702   * Listens for page destruction.
6703   * Called when the page is destroyed.
6704   *
6705   * @syscap SystemCapability.ArkUI.ArkUI.Full
6706   * @since 4
6707   */
6708  /**
6709   * Listens for page destruction.
6710   * Called when the page is destroyed.
6711   *
6712   * @syscap SystemCapability.ArkUI.ArkUI.Full
6713   * @atomicservice
6714   * @since 11
6715   */
6716  onDestroy?(): void;
6717
6718  /**
6719   * Listens for the back button action.
6720   * The back button is tapped:
6721   *
6722   * @returns { boolean } true means that the page processes the return logic.
6723   * false means that the default return logic is used.
6724   * If no value is returned, the default return logic is used.
6725   * @syscap SystemCapability.ArkUI.ArkUI.Full
6726   * @since 4
6727   */
6728  /**
6729   * Listens for the back button action.
6730   * The back button is tapped:
6731   *
6732   * @returns { boolean } true means that the page processes the return logic.
6733   * false means that the default return logic is used.
6734   * If no value is returned, the default return logic is used.
6735   * @syscap SystemCapability.ArkUI.ArkUI.Full
6736   * @atomicservice
6737   * @since 11
6738   */
6739  onBackPress?(): boolean;
6740
6741  /**
6742   * Listens for page active.
6743   * Called when the page is active.
6744   *
6745   * @syscap SystemCapability.ArkUI.ArkUI.Full
6746   * @since 5
6747   */
6748  /**
6749   * Listens for page active.
6750   * Called when the page is active.
6751   *
6752   * @syscap SystemCapability.ArkUI.ArkUI.Full
6753   * @atomicservice
6754   * @since 11
6755   */
6756  onActive?(): void;
6757
6758  /**
6759   * Listens for page inactive.
6760   * Called when the page is paused.
6761   *
6762   * @syscap SystemCapability.ArkUI.ArkUI.Full
6763   * @since 5
6764   */
6765  /**
6766   * Listens for page inactive.
6767   * Called when the page is paused.
6768   *
6769   * @syscap SystemCapability.ArkUI.ArkUI.Full
6770   * @atomicservice
6771   * @since 11
6772   */
6773  onInactive?(): void;
6774
6775  /**
6776   * This callback is triggered when a new request is received when the FA has started.
6777   *
6778   * @syscap SystemCapability.ArkUI.ArkUI.Full
6779   * @since 5
6780   */
6781  /**
6782   * This callback is triggered when a new request is received when the FA has started.
6783   *
6784   * @syscap SystemCapability.ArkUI.ArkUI.Full
6785   * @atomicservice
6786   * @since 11
6787   */
6788  onNewRequest?(): void;
6789
6790  /**
6791   * Callback when FA initiates a migration, in this callback, the application can decide whether
6792   * to migrate according to the current state.
6793   *
6794   * @returns { boolean }
6795   * @syscap SystemCapability.ArkUI.ArkUI.Full
6796   * @since 5
6797   */
6798  /**
6799   * Callback when FA initiates a migration, in this callback, the application can decide whether
6800   * to migrate according to the current state.
6801   *
6802   * @returns { boolean }
6803   * @syscap SystemCapability.ArkUI.ArkUI.Full
6804   * @atomicservice
6805   * @since 11
6806   */
6807  onStartContinuation?(): boolean;
6808
6809  /**
6810   * For the callback of saving state data, the developer needs to fill in the parameter object
6811   * the data to be migrated to the target device.
6812   *
6813   * @param { object } value
6814   * @syscap SystemCapability.ArkUI.ArkUI.Full
6815   * @since 5
6816   */
6817  /**
6818   * For the callback of saving state data, the developer needs to fill in the parameter object
6819   * the data to be migrated to the target device.
6820   *
6821   * @param { object } value
6822   * @syscap SystemCapability.ArkUI.ArkUI.Full
6823   * @atomicservice
6824   * @since 11
6825   */
6826  onSaveData?(value: object): void;
6827
6828  /**
6829   * The callback to restore the data saved by the onSaveData method when the migration was initiated.
6830   *
6831   * @param { object } value
6832   * @syscap SystemCapability.ArkUI.ArkUI.Full
6833   * @since 5
6834   */
6835  /**
6836   * The callback to restore the data saved by the onSaveData method when the migration was initiated.
6837   *
6838   * @param { object } value
6839   * @syscap SystemCapability.ArkUI.ArkUI.Full
6840   * @atomicservice
6841   * @since 11
6842   */
6843  onRestoreData?(value: object): void;
6844
6845  /**
6846   * The callback for the completion of the migration, which is triggered on the calling side, indicates
6847   * the result of the application migration to the target device.
6848   *
6849   * @param { number } code
6850   * @syscap SystemCapability.ArkUI.ArkUI.Full
6851   * @since 5
6852   */
6853  /**
6854   * The callback for the completion of the migration, which is triggered on the calling side, indicates
6855   * the result of the application migration to the target device.
6856   *
6857   * @param { number } code
6858   * @syscap SystemCapability.ArkUI.ArkUI.Full
6859   * @atomicservice
6860   * @since 11
6861   */
6862  onCompleteContinuation?(code: number): void;
6863
6864  /**
6865   * This callback is triggered when the corresponding system configuration changes, such as system font size,
6866   * language region, etc.
6867   *
6868   * @param { Configuration } configuration
6869   * @syscap SystemCapability.ArkUI.ArkUI.Full
6870   * @since 6
6871   */
6872  /**
6873   * This callback is triggered when the corresponding system configuration changes, such as system font size,
6874   * language region, etc.
6875   *
6876   * @param { Configuration } configuration
6877   * @syscap SystemCapability.ArkUI.ArkUI.Full
6878   * @atomicservice
6879   * @since 11
6880   */
6881  onConfigurationUpdated?(configuration: Configuration): void;
6882
6883  /**
6884   * Listens for application creation.
6885   * Called when the application is created.
6886   *
6887   * @syscap SystemCapability.ArkUI.ArkUI.Full
6888   * @since 4
6889   */
6890  /**
6891   * Listens for application creation.
6892   * Called when the application is created.
6893   *
6894   * @syscap SystemCapability.ArkUI.ArkUI.Full
6895   * @atomicservice
6896   * @since 11
6897   */
6898  onCreate?(): void;
6899}
6900
6901/**
6902 * Used for ide.
6903 *
6904 * @syscap SystemCapability.ArkUI.ArkUI.Lite
6905 * @systemapi
6906 * @since 4
6907 */
6908type DefaultData<T> = object;
6909/**
6910 * Used for ide.
6911 *
6912 * @syscap SystemCapability.ArkUI.ArkUI.Lite
6913 * @systemapi
6914 * @since 4
6915 */
6916type CombinedOptions<T extends ViewModel, Data> = object & Options<T, Data> & ThisType<T & ViewModel & Data>;
6917/**
6918 * @param { CombinedOptions<T, Data> } options
6919 * @returns { ViewModel & Data }
6920 * @syscap SystemCapability.ArkUI.ArkUI.Lite
6921 * @systemapi
6922 * @since 4
6923 */
6924export declare function extendViewModel<T extends ViewModel, Data>(options: CombinedOptions<T, Data>): ViewModel & Data;
6925