• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Import the drawing canvas type object for Canvas.
23 *
24 * @typedef { import('../api/@ohos.graphics.drawing').default.Canvas } DrawingCanvas
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @crossplatform
27 * @atomicservice
28 * @since 12
29 */
30declare type DrawingCanvas = import('../api/@ohos.graphics.drawing').default.Canvas;
31
32/**
33 * Filling style algorithm, which determines whether a point is within or outside the path. The following
34 *    two configurations are supported:
35 * "evenodd": odd and even round rule
36 * "nonzero": (Default) Non-zero Wrap Rules
37 *
38 * @typedef { "evenodd" | "nonzero" } CanvasFillRule
39 * @syscap SystemCapability.ArkUI.ArkUI.Full
40 * @since 8
41 */
42/**
43 * Filling style algorithm, which determines whether a point is within or outside the path. The following
44 *    two configurations are supported:
45 * "evenodd": odd and even round rule
46 * "nonzero": (Default) Non-zero Wrap Rules
47 *
48 * @typedef { "evenodd" | "nonzero" } CanvasFillRule
49 * @syscap SystemCapability.ArkUI.ArkUI.Full
50 * @form
51 * @since 9
52 */
53/**
54 * Filling style algorithm, which determines whether a point is within or outside the path. The following
55 *    two configurations are supported:
56 * "evenodd": odd and even round rule
57 * "nonzero": (Default) Non-zero Wrap Rules
58 *
59 * @typedef { "evenodd" | "nonzero" } CanvasFillRule
60 * @syscap SystemCapability.ArkUI.ArkUI.Full
61 * @crossplatform
62 * @form
63 * @since 10
64 */
65/**
66 * Filling style algorithm, which determines whether a point is within or outside the path. The following
67 *    two configurations are supported:
68 * "evenodd": odd and even round rule
69 * "nonzero": (Default) Non-zero Wrap Rules
70 *
71 * @typedef { "evenodd" | "nonzero" } CanvasFillRule
72 * @syscap SystemCapability.ArkUI.ArkUI.Full
73 * @crossplatform
74 * @form
75 * @atomicservice
76 * @since 11
77 */
78declare type CanvasFillRule = "evenodd" | "nonzero";
79
80/**
81 * Specifies the attribute of drawing the end of each line segment. The following configurations are supported:
82 * "butt": (Default) Segment Ends in Square
83 * "round": Segment ends in a circle
84 * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width
85 *    as the segment and is half the thickness of the segment.
86 *
87 * @typedef { "butt" | "round" | "square" } CanvasLineCap
88 * @syscap SystemCapability.ArkUI.ArkUI.Full
89 * @since 8
90 */
91/**
92 * Specifies the attribute of drawing the end of each line segment. The following configurations are supported:
93 * "butt": (Default) Segment Ends in Square
94 * "round": Segment ends in a circle
95 * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width
96 *    as the segment and is half the thickness of the segment.
97 *
98 * @typedef { "butt" | "round" | "square" } CanvasLineCap
99 * @syscap SystemCapability.ArkUI.ArkUI.Full
100 * @form
101 * @since 9
102 */
103/**
104 * Specifies the attribute of drawing the end of each line segment. The following configurations are supported:
105 * "butt": (Default) Segment Ends in Square
106 * "round": Segment ends in a circle
107 * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width
108 *    as the segment and is half the thickness of the segment.
109 *
110 * @typedef { "butt" | "round" | "square" } CanvasLineCap
111 * @syscap SystemCapability.ArkUI.ArkUI.Full
112 * @crossplatform
113 * @form
114 * @since 10
115 */
116/**
117 * Specifies the attribute of drawing the end of each line segment. The following configurations are supported:
118 * "butt": (Default) Segment Ends in Square
119 * "round": Segment ends in a circle
120 * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width
121 *    as the segment and is half the thickness of the segment.
122 *
123 * @typedef { "butt" | "round" | "square" } CanvasLineCap
124 * @syscap SystemCapability.ArkUI.ArkUI.Full
125 * @crossplatform
126 * @form
127 * @atomicservice
128 * @since 11
129 */
130declare type CanvasLineCap = "butt" | "round" | "square";
131
132/**
133 * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0
134 *    are connected together. The following three configurations are supported:
135 * "bevel": Fill the ends of the connected sections with an additional triangle-base area,
136 *    each with its own independent rectangular corner.
137 * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions
138 *    so that they intersect at a point.
139 * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the
140 *    connected section. The radius of the fillet is the width of the segment.
141 *
142 * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin
143 * @syscap SystemCapability.ArkUI.ArkUI.Full
144 * @since 8
145 */
146/**
147 * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0
148 *    are connected together. The following three configurations are supported:
149 * "bevel": Fill the ends of the connected sections with an additional triangle-base area,
150 *    each with its own independent rectangular corner.
151 * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions
152 *    so that they intersect at a point.
153 * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the
154 *    connected section. The radius of the fillet is the width of the segment.
155 *
156 * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin
157 * @syscap SystemCapability.ArkUI.ArkUI.Full
158 * @form
159 * @since 9
160 */
161/**
162 * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0
163 *    are connected together. The following three configurations are supported:
164 * "bevel": Fill the ends of the connected sections with an additional triangle-base area,
165 *    each with its own independent rectangular corner.
166 * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions
167 *    so that they intersect at a point.
168 * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the
169 *    connected section. The radius of the fillet is the width of the segment.
170 *
171 * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin
172 * @syscap SystemCapability.ArkUI.ArkUI.Full
173 * @crossplatform
174 * @form
175 * @since 10
176 */
177/**
178 * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0
179 *    are connected together. The following three configurations are supported:
180 * "bevel": Fill the ends of the connected sections with an additional triangle-base area,
181 *    each with its own independent rectangular corner.
182 * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions
183 *    so that they intersect at a point.
184 * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the
185 *    connected section. The radius of the fillet is the width of the segment.
186 *
187 * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin
188 * @syscap SystemCapability.ArkUI.ArkUI.Full
189 * @crossplatform
190 * @form
191 * @atomicservice
192 * @since 11
193 */
194declare type CanvasLineJoin = "bevel" | "miter" | "round";
195
196/**
197 * Indicates the attribute of the current text direction. The options are as follows:
198 * "inherit": (Default) Inherit current Canvas component settings
199 * "ltr": The text direction is left to right.
200 * "rtl": The text direction is from right to left.
201 *
202 * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection
203 * @syscap SystemCapability.ArkUI.ArkUI.Full
204 * @since 8
205 */
206/**
207 * Indicates the attribute of the current text direction. The options are as follows:
208 * "inherit": (Default) Inherit current Canvas component settings
209 * "ltr": The text direction is left to right.
210 * "rtl": The text direction is from right to left.
211 *
212 * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection
213 * @syscap SystemCapability.ArkUI.ArkUI.Full
214 * @form
215 * @since 9
216 */
217/**
218 * Indicates the attribute of the current text direction. The options are as follows:
219 * "inherit": (Default) Inherit current Canvas component settings
220 * "ltr": The text direction is left to right.
221 * "rtl": The text direction is from right to left.
222 *
223 * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection
224 * @syscap SystemCapability.ArkUI.ArkUI.Full
225 * @crossplatform
226 * @form
227 * @since 10
228 */
229/**
230 * Indicates the attribute of the current text direction. The options are as follows:
231 * "inherit": (Default) Inherit current Canvas component settings
232 * "ltr": The text direction is left to right.
233 * "rtl": The text direction is from right to left.
234 *
235 * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection
236 * @syscap SystemCapability.ArkUI.ArkUI.Full
237 * @crossplatform
238 * @form
239 * @atomicservice
240 * @since 11
241 */
242declare type CanvasDirection = "inherit" | "ltr" | "rtl";
243
244/**
245 * Describes the alignment mode for drawing text. The options are as follows:
246 * "center": The text is centered.
247 * "end": Where text aligns lines end (Left alignment refers to the local from left to right,
248 *    and right alignment refers to the local from right to left)
249 * "left": The text is left-aligned.
250 * "right": The text is right-aligned.
251 * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right,
252 *    and right alignment refers to the local from right to left)
253 *
254 * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign
255 * @syscap SystemCapability.ArkUI.ArkUI.Full
256 * @since 8
257 */
258/**
259 * Describes the alignment mode for drawing text. The options are as follows:
260 * "center": The text is centered.
261 * "end": Where text aligns lines end (Left alignment refers to the local from left to right,
262 *    and right alignment refers to the local from right to left)
263 * "left": The text is left-aligned.
264 * "right": The text is right-aligned.
265 * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right,
266 *    and right alignment refers to the local from right to left)
267 *
268 * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign
269 * @syscap SystemCapability.ArkUI.ArkUI.Full
270 * @form
271 * @since 9
272 */
273/**
274 * Describes the alignment mode for drawing text. The options are as follows:
275 * "center": The text is centered.
276 * "end": Where text aligns lines end (Left alignment refers to the local from left to right,
277 *    and right alignment refers to the local from right to left)
278 * "left": The text is left-aligned.
279 * "right": The text is right-aligned.
280 * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right,
281 *    and right alignment refers to the local from right to left)
282 *
283 * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign
284 * @syscap SystemCapability.ArkUI.ArkUI.Full
285 * @crossplatform
286 * @form
287 * @since 10
288 */
289/**
290 * Describes the alignment mode for drawing text. The options are as follows:
291 * "center": The text is centered.
292 * "end": Where text aligns lines end (Left alignment refers to the local from left to right,
293 *    and right alignment refers to the local from right to left)
294 * "left": The text is left-aligned.
295 * "right": The text is right-aligned.
296 * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right,
297 *    and right alignment refers to the local from right to left)
298 *
299 * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign
300 * @syscap SystemCapability.ArkUI.ArkUI.Full
301 * @crossplatform
302 * @form
303 * @atomicservice
304 * @since 11
305 */
306declare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start";
307
308/**
309 * Text baseline, which supports the following configurations:
310 * "alphabetic": (Default) The text baseline is the standard letter baseline.
311 * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline
312 *    and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters.
313 * "hanging": The text baseline is a hanging baseline.
314 * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic
315 *    baseline, the ideographic baseline is at the bottom of the character itself.
316 * "middle": The text baseline is in the middle of the text block.
317 * "top": The text baseline is at the top of the text block.
318 *
319 * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline
320 * @syscap SystemCapability.ArkUI.ArkUI.Full
321 * @since 8
322 */
323/**
324 * Text baseline, which supports the following configurations:
325 * "alphabetic": (Default) The text baseline is the standard letter baseline.
326 * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline
327 *    and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters.
328 * "hanging": The text baseline is a hanging baseline.
329 * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic
330 *    baseline, the ideographic baseline is at the bottom of the character itself.
331 * "middle": The text baseline is in the middle of the text block.
332 * "top": The text baseline is at the top of the text block.
333 *
334 * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline
335 * @syscap SystemCapability.ArkUI.ArkUI.Full
336 * @form
337 * @since 9
338 */
339/**
340 * Text baseline, which supports the following configurations:
341 * "alphabetic": (Default) The text baseline is the standard letter baseline.
342 * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline
343 *    and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters.
344 * "hanging": The text baseline is a hanging baseline.
345 * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic
346 *    baseline, the ideographic baseline is at the bottom of the character itself.
347 * "middle": The text baseline is in the middle of the text block.
348 * "top": The text baseline is at the top of the text block.
349 *
350 * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline
351 * @syscap SystemCapability.ArkUI.ArkUI.Full
352 * @crossplatform
353 * @form
354 * @since 10
355 */
356/**
357 * Text baseline, which supports the following configurations:
358 * "alphabetic": (Default) The text baseline is the standard letter baseline.
359 * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline
360 *    and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters.
361 * "hanging": The text baseline is a hanging baseline.
362 * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic
363 *    baseline, the ideographic baseline is at the bottom of the character itself.
364 * "middle": The text baseline is in the middle of the text block.
365 * "top": The text baseline is at the top of the text block.
366 *
367 * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline
368 * @syscap SystemCapability.ArkUI.ArkUI.Full
369 * @crossplatform
370 * @form
371 * @atomicservice
372 * @since 11
373 */
374declare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top";
375
376/**
377 * Sets the image smoothness attribute. The options are as follows:
378 * "high": height
379 * "low": (default)low
380 * "medium": medium
381 *
382 * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality
383 * @syscap SystemCapability.ArkUI.ArkUI.Full
384 * @since 8
385 */
386/**
387 * Sets the image smoothness attribute. The options are as follows:
388 * "high": height
389 * "low": (default)low
390 * "medium": medium
391 *
392 * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality
393 * @syscap SystemCapability.ArkUI.ArkUI.Full
394 * @form
395 * @since 9
396 */
397/**
398 * Sets the image smoothness attribute. The options are as follows:
399 * "high": height
400 * "low": (default)low
401 * "medium": medium
402 *
403 * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality
404 * @syscap SystemCapability.ArkUI.ArkUI.Full
405 * @crossplatform
406 * @form
407 * @since 10
408 */
409/**
410 * Sets the image smoothness attribute. The options are as follows:
411 * "high": height
412 * "low": (default)low
413 * "medium": medium
414 *
415 * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality
416 * @syscap SystemCapability.ArkUI.ArkUI.Full
417 * @crossplatform
418 * @form
419 * @atomicservice
420 * @since 11
421 */
422declare type ImageSmoothingQuality = "high" | "low" | "medium";
423
424/**
425 * Import the frame node type object for Canvas.
426 *
427 * @typedef { import('../api/arkui/FrameNode').FrameNode } FrameNode
428 * @syscap SystemCapability.ArkUI.ArkUI.Full
429 * @crossplatform
430 * @atomicservice
431 * @since 13
432 */
433declare type FrameNode = import('../api/arkui/FrameNode').FrameNode;
434
435/**
436 * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient()
437 *
438 * @syscap SystemCapability.ArkUI.ArkUI.Full
439 * @since 8
440 */
441/**
442 * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient()
443 *
444 * @syscap SystemCapability.ArkUI.ArkUI.Full
445 * @form
446 * @since 9
447 */
448/**
449 * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient()
450 *
451 * @syscap SystemCapability.ArkUI.ArkUI.Full
452 * @crossplatform
453 * @form
454 * @since 10
455 */
456/**
457 * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient()
458 *
459 * @syscap SystemCapability.ArkUI.ArkUI.Full
460 * @crossplatform
461 * @form
462 * @atomicservice
463 * @since 11
464 */
465declare class CanvasGradient {
466  /**
467   * Add a breakpoint defined by offset and color to the gradient
468   *
469   * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error
470   * @param { string } color - CSS color value <color>. If the color value cannot be resolved to a valid CSS color value <color>
471   *    a SYNTAX_ERR error is thrown.
472   * @syscap SystemCapability.ArkUI.ArkUI.Full
473   * @since 8
474   */
475  /**
476   * Add a breakpoint defined by offset and color to the gradient
477   *
478   * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error
479   * @param { string } color - CSS color value <color>. If the color value cannot be resolved to a valid CSS color value <color>
480   *    a SYNTAX_ERR error is thrown.
481   * @syscap SystemCapability.ArkUI.ArkUI.Full
482   * @form
483   * @since 9
484   */
485  /**
486   * Add a breakpoint defined by offset and color to the gradient
487   *
488   * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error
489   * @param { string } color - Set the gradient color.
490   *    a SYNTAX_ERR error is thrown.
491   * @syscap SystemCapability.ArkUI.ArkUI.Full
492   * @crossplatform
493   * @form
494   * @since 10
495   */
496  /**
497   * Add a breakpoint defined by offset and color to the gradient
498   *
499   * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error
500   * @param { string } color - Set the gradient color.
501   *    a SYNTAX_ERR error is thrown.
502   * @syscap SystemCapability.ArkUI.ArkUI.Full
503   * @crossplatform
504   * @form
505   * @atomicservice
506   * @since 11
507   */
508  addColorStop(offset: number, color: string): void;
509}
510
511/**
512 * Path object, which provides basic methods for drawing paths.
513 *
514 * @syscap SystemCapability.ArkUI.ArkUI.Full
515 * @since 8
516 */
517/**
518 * Path object, which provides basic methods for drawing paths.
519 *
520 * @syscap SystemCapability.ArkUI.ArkUI.Full
521 * @form
522 * @since 9
523 */
524/**
525 * Path object, which provides basic methods for drawing paths.
526 *
527 * @syscap SystemCapability.ArkUI.ArkUI.Full
528 * @crossplatform
529 * @form
530 * @since 10
531 */
532/**
533 * Path object, which provides basic methods for drawing paths.
534 *
535 * @syscap SystemCapability.ArkUI.ArkUI.Full
536 * @crossplatform
537 * @form
538 * @atomicservice
539 * @since 11
540 */
541declare class CanvasPath {
542  /**
543   * Draw an arc path
544   *
545   * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc.
546   * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc.
547   * @param { number } radius - Radius of the arc.
548   * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian.
549   * @param { number } endAngle - The end point of the arc, in radians.
550   * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise,
551   *    the arc is drawn clockwise. The default value is false.
552   * @syscap SystemCapability.ArkUI.ArkUI.Full
553   * @since 8
554   */
555  /**
556   * Draw an arc path
557   *
558   * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc.
559   * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc.
560   * @param { number } radius - Radius of the arc.
561   * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian.
562   * @param { number } endAngle - The end point of the arc, in radians.
563   * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise,
564   *    the arc is drawn clockwise. The default value is false.
565   * @syscap SystemCapability.ArkUI.ArkUI.Full
566   * @form
567   * @since 9
568   */
569  /**
570   * Draw an arc path
571   *
572   * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc.
573   * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc.
574   * @param { number } radius - Radius of the arc.
575   * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian.
576   * @param { number } endAngle - The end point of the arc, in radians.
577   * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise,
578   *    the arc is drawn clockwise. The default value is false.
579   * @syscap SystemCapability.ArkUI.ArkUI.Full
580   * @crossplatform
581   * @form
582   * @since 10
583   */
584  /**
585   * Draw an arc path
586   *
587   * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc.
588   * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc.
589   * @param { number } radius - Radius of the arc.
590   * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian.
591   * @param { number } endAngle - The end point of the arc, in radians.
592   * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise,
593   *    the arc is drawn clockwise. The default value is false.
594   * @syscap SystemCapability.ArkUI.ArkUI.Full
595   * @crossplatform
596   * @form
597   * @atomicservice
598   * @since 11
599   */
600  arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
601
602  /**
603   * Draw arc paths based on control points and radius
604   *
605   * @param { number } x1 - The x-axis coordinate of the first control point.
606   * @param { number } y1 - The y-axis coordinate of the first control point.
607   * @param { number } x2 - The x-axis coordinate of the second control point.
608   * @param { number } y2 - The y-axis coordinate of the second control point.
609   * @param { number } radius - Radius of the arc.
610   * @syscap SystemCapability.ArkUI.ArkUI.Full
611   * @since 8
612   */
613  /**
614   * Draw arc paths based on control points and radius
615   *
616   * @param { number } x1 - The x-axis coordinate of the first control point.
617   * @param { number } y1 - The y-axis coordinate of the first control point.
618   * @param { number } x2 - The x-axis coordinate of the second control point.
619   * @param { number } y2 - The y-axis coordinate of the second control point.
620   * @param { number } radius - Radius of the arc.
621   * @syscap SystemCapability.ArkUI.ArkUI.Full
622   * @form
623   * @since 9
624   */
625  /**
626   * Draw arc paths based on control points and radius
627   *
628   * @param { number } x1 - The x-axis coordinate of the first control point.
629   * @param { number } y1 - The y-axis coordinate of the first control point.
630   * @param { number } x2 - The x-axis coordinate of the second control point.
631   * @param { number } y2 - The y-axis coordinate of the second control point.
632   * @param { number } radius - Radius of the arc.
633   * @syscap SystemCapability.ArkUI.ArkUI.Full
634   * @crossplatform
635   * @form
636   * @since 10
637   */
638  /**
639   * Draw arc paths based on control points and radius
640   *
641   * @param { number } x1 - The x-axis coordinate of the first control point.
642   * @param { number } y1 - The y-axis coordinate of the first control point.
643   * @param { number } x2 - The x-axis coordinate of the second control point.
644   * @param { number } y2 - The y-axis coordinate of the second control point.
645   * @param { number } radius - Radius of the arc.
646   * @syscap SystemCapability.ArkUI.ArkUI.Full
647   * @crossplatform
648   * @form
649   * @atomicservice
650   * @since 11
651   */
652  arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
653
654  /**
655   * Drawing Cubic Bessel Curve Paths
656   *
657   * @param { number } cp1x - The x-axis coordinate of the first control point.
658   * @param { number } cp1y - The y-axis coordinate of the first control point.
659   * @param { number } cp2x - The x-axis coordinate of the second control point.
660   * @param { number } cp2y - The y-axis coordinate of the second control point.
661   * @param { number } x - x-axis coordinate of the end point.
662   * @param { number } y - y-axis coordinate of the end point.
663   * @syscap SystemCapability.ArkUI.ArkUI.Full
664   * @since 8
665   */
666  /**
667   * Drawing Cubic Bessel Curve Paths
668   *
669   * @param { number } cp1x - The x-axis coordinate of the first control point.
670   * @param { number } cp1y - The y-axis coordinate of the first control point.
671   * @param { number } cp2x - The x-axis coordinate of the second control point.
672   * @param { number } cp2y - The y-axis coordinate of the second control point.
673   * @param { number } x - x-axis coordinate of the end point.
674   * @param { number } y - y-axis coordinate of the end point.
675   * @syscap SystemCapability.ArkUI.ArkUI.Full
676   * @form
677   * @since 9
678   */
679  /**
680   * Drawing Cubic Bessel Curve Paths
681   *
682   * @param { number } cp1x - The x-axis coordinate of the first control point.
683   * @param { number } cp1y - The y-axis coordinate of the first control point.
684   * @param { number } cp2x - The x-axis coordinate of the second control point.
685   * @param { number } cp2y - The y-axis coordinate of the second control point.
686   * @param { number } x - x-axis coordinate of the end point.
687   * @param { number } y - y-axis coordinate of the end point.
688   * @syscap SystemCapability.ArkUI.ArkUI.Full
689   * @crossplatform
690   * @form
691   * @since 10
692   */
693  /**
694   * Drawing Cubic Bessel Curve Paths
695   *
696   * @param { number } cp1x - The x-axis coordinate of the first control point.
697   * @param { number } cp1y - The y-axis coordinate of the first control point.
698   * @param { number } cp2x - The x-axis coordinate of the second control point.
699   * @param { number } cp2y - The y-axis coordinate of the second control point.
700   * @param { number } x - x-axis coordinate of the end point.
701   * @param { number } y - y-axis coordinate of the end point.
702   * @syscap SystemCapability.ArkUI.ArkUI.Full
703   * @crossplatform
704   * @form
705   * @atomicservice
706   * @since 11
707   */
708  bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
709
710  /**
711   * Returns the pen point to the start point of the current sub-path
712   *
713   * @syscap SystemCapability.ArkUI.ArkUI.Full
714   * @since 8
715   */
716  /**
717   * Returns the pen point to the start point of the current sub-path
718   *
719   * @syscap SystemCapability.ArkUI.ArkUI.Full
720   * @form
721   * @since 9
722   */
723  /**
724   * Returns the pen point to the start point of the current sub-path
725   *
726   * @syscap SystemCapability.ArkUI.ArkUI.Full
727   * @crossplatform
728   * @form
729   * @since 10
730   */
731  /**
732   * Returns the pen point to the start point of the current sub-path
733   *
734   * @syscap SystemCapability.ArkUI.ArkUI.Full
735   * @crossplatform
736   * @form
737   * @atomicservice
738   * @since 11
739   */
740  closePath(): void;
741
742  /**
743   * Draw an Elliptic Path
744   *
745   * @param { number } x - x-axis coordinate of the center of the ellipse.
746   * @param { number } y - y-axis coordinate of the center of the ellipse.
747   * @param { number } radiusX - Radius of the major axis of the ellipse.
748   * @param { number } radiusY - Radius of the minor axis of the ellipse.
749   * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees).
750   * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians
751   *    (not angular degrees).
752   * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees).
753   * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise,
754   *    the ellipse is drawn clockwise. The default value is false.
755   * @syscap SystemCapability.ArkUI.ArkUI.Full
756   * @since 8
757   */
758  /**
759   * Draw an Elliptic Path
760   *
761   * @param { number } x - x-axis coordinate of the center of the ellipse.
762   * @param { number } y - y-axis coordinate of the center of the ellipse.
763   * @param { number } radiusX - Radius of the major axis of the ellipse.
764   * @param { number } radiusY - Radius of the minor axis of the ellipse.
765   * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees).
766   * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians
767   *    (not angular degrees).
768   * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees).
769   * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise,
770   *    the ellipse is drawn clockwise. The default value is false.
771   * @syscap SystemCapability.ArkUI.ArkUI.Full
772   * @form
773   * @since 9
774   */
775  /**
776   * Draw an Elliptic Path
777   *
778   * @param { number } x - x-axis coordinate of the center of the ellipse.
779   * @param { number } y - y-axis coordinate of the center of the ellipse.
780   * @param { number } radiusX - Radius of the major axis of the ellipse.
781   * @param { number } radiusY - Radius of the minor axis of the ellipse.
782   * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees).
783   * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians
784   *    (not angular degrees).
785   * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees).
786   * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise,
787   *    the ellipse is drawn clockwise. The default value is false.
788   * @syscap SystemCapability.ArkUI.ArkUI.Full
789   * @crossplatform
790   * @form
791   * @since 10
792   */
793  /**
794   * Draw an Elliptic Path
795   *
796   * @param { number } x - x-axis coordinate of the center of the ellipse.
797   * @param { number } y - y-axis coordinate of the center of the ellipse.
798   * @param { number } radiusX - Radius of the major axis of the ellipse.
799   * @param { number } radiusY - Radius of the minor axis of the ellipse.
800   * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees).
801   * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians
802   *    (not angular degrees).
803   * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees).
804   * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise,
805   *    the ellipse is drawn clockwise. The default value is false.
806   * @syscap SystemCapability.ArkUI.ArkUI.Full
807   * @crossplatform
808   * @form
809   * @atomicservice
810   * @since 11
811   */
812  ellipse(
813    x: number,
814    y: number,
815    radiusX: number,
816    radiusY: number,
817    rotation: number,
818    startAngle: number,
819    endAngle: number,
820    counterclockwise?: boolean,
821  ): void;
822
823  /**
824   * Connect sub-path using straight lines
825   *
826   * @param { number } x - The x-axis coordinate of the end point of the line.
827   * @param { number } y - The y-axis coordinate of the end point of the line.
828   * @syscap SystemCapability.ArkUI.ArkUI.Full
829   * @since 8
830   */
831  /**
832   * Connect sub-path using straight lines
833   *
834   * @param { number } x - The x-axis coordinate of the end point of the line.
835   * @param { number } y - The y-axis coordinate of the end point of the line.
836   * @syscap SystemCapability.ArkUI.ArkUI.Full
837   * @form
838   * @since 9
839   */
840  /**
841   * Connect sub-path using straight lines
842   *
843   * @param { number } x - The x-axis coordinate of the end point of the line.
844   * @param { number } y - The y-axis coordinate of the end point of the line.
845   * @syscap SystemCapability.ArkUI.ArkUI.Full
846   * @crossplatform
847   * @form
848   * @since 10
849   */
850  /**
851   * Connect sub-path using straight lines
852   *
853   * @param { number } x - The x-axis coordinate of the end point of the line.
854   * @param { number } y - The y-axis coordinate of the end point of the line.
855   * @syscap SystemCapability.ArkUI.ArkUI.Full
856   * @crossplatform
857   * @form
858   * @atomicservice
859   * @since 11
860   */
861  lineTo(x: number, y: number): void;
862
863  /**
864   * Moves the start point of a new sub-path to the (x, y) coordinate.
865   *
866   * @param { number } x - The x-axis coordinate of the point.
867   * @param { number } y - The y-axis coordinate of the point.
868   * @syscap SystemCapability.ArkUI.ArkUI.Full
869   * @since 8
870   */
871  /**
872   * Moves the start point of a new sub-path to the (x, y) coordinate.
873   *
874   * @param { number } x - The x-axis coordinate of the point.
875   * @param { number } y - The y-axis coordinate of the point.
876   * @syscap SystemCapability.ArkUI.ArkUI.Full
877   * @form
878   * @since 9
879   */
880  /**
881   * Moves the start point of a new sub-path to the (x, y) coordinate.
882   *
883   * @param { number } x - The x-axis coordinate of the point.
884   * @param { number } y - The y-axis coordinate of the point.
885   * @syscap SystemCapability.ArkUI.ArkUI.Full
886   * @crossplatform
887   * @form
888   * @since 10
889   */
890  /**
891   * Moves the start point of a new sub-path to the (x, y) coordinate.
892   *
893   * @param { number } x - The x-axis coordinate of the point.
894   * @param { number } y - The y-axis coordinate of the point.
895   * @syscap SystemCapability.ArkUI.ArkUI.Full
896   * @crossplatform
897   * @form
898   * @atomicservice
899   * @since 11
900   */
901  moveTo(x: number, y: number): void;
902
903  /**
904   * Draw quadratic Bezier curve paths
905   *
906   * @param { number } cpx - The x-axis coordinate of the control point.
907   * @param { number } cpy - The y-axis coordinate of the control point.
908   * @param { number } x - x-axis coordinate of the end point.
909   * @param { number } y - y-axis coordinate of the end point.
910   * @syscap SystemCapability.ArkUI.ArkUI.Full
911   * @since 8
912   */
913  /**
914   * Draw quadratic Bezier curve paths
915   *
916   * @param { number } cpx - The x-axis coordinate of the control point.
917   * @param { number } cpy - The y-axis coordinate of the control point.
918   * @param { number } x - x-axis coordinate of the end point.
919   * @param { number } y - y-axis coordinate of the end point.
920   * @syscap SystemCapability.ArkUI.ArkUI.Full
921   * @form
922   * @since 9
923   */
924  /**
925   * Draw quadratic Bezier curve paths
926   *
927   * @param { number } cpx - The x-axis coordinate of the control point.
928   * @param { number } cpy - The y-axis coordinate of the control point.
929   * @param { number } x - x-axis coordinate of the end point.
930   * @param { number } y - y-axis coordinate of the end point.
931   * @syscap SystemCapability.ArkUI.ArkUI.Full
932   * @crossplatform
933   * @form
934   * @since 10
935   */
936  /**
937   * Draw quadratic Bezier curve paths
938   *
939   * @param { number } cpx - The x-axis coordinate of the control point.
940   * @param { number } cpy - The y-axis coordinate of the control point.
941   * @param { number } x - x-axis coordinate of the end point.
942   * @param { number } y - y-axis coordinate of the end point.
943   * @syscap SystemCapability.ArkUI.ArkUI.Full
944   * @crossplatform
945   * @form
946   * @atomicservice
947   * @since 11
948   */
949  quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
950
951  /**
952   * Draw Rectangular Paths
953   *
954   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
955   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
956   * @param { number } w - Width of the rectangle.
957   * @param { number } h - Height of the rectangle.
958   * @syscap SystemCapability.ArkUI.ArkUI.Full
959   * @since 8
960   */
961  /**
962   * Draw Rectangular Paths
963   *
964   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
965   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
966   * @param { number } w - Width of the rectangle.
967   * @param { number } h - Height of the rectangle.
968   * @syscap SystemCapability.ArkUI.ArkUI.Full
969   * @form
970   * @since 9
971   */
972  /**
973   * Draw Rectangular Paths
974   *
975   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
976   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
977   * @param { number } w - Width of the rectangle.
978   * @param { number } h - Height of the rectangle.
979   * @syscap SystemCapability.ArkUI.ArkUI.Full
980   * @crossplatform
981   * @form
982   * @since 10
983   */
984  /**
985   * Draw Rectangular Paths
986   *
987   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
988   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
989   * @param { number } w - Width of the rectangle.
990   * @param { number } h - Height of the rectangle.
991   * @syscap SystemCapability.ArkUI.ArkUI.Full
992   * @crossplatform
993   * @form
994   * @atomicservice
995   * @since 11
996   */
997  rect(x: number, y: number, w: number, h: number): void;
998}
999
1000/**
1001 * 2D path object for path drawing
1002 *
1003 * @extends CanvasPath
1004 * @syscap SystemCapability.ArkUI.ArkUI.Full
1005 * @since 8
1006 */
1007/**
1008 * 2D path object for path drawing
1009 *
1010 * @extends CanvasPath
1011 * @syscap SystemCapability.ArkUI.ArkUI.Full
1012 * @form
1013 * @since 9
1014 */
1015/**
1016 * 2D path object for path drawing
1017 *
1018 * @extends CanvasPath
1019 * @syscap SystemCapability.ArkUI.ArkUI.Full
1020 * @crossplatform
1021 * @form
1022 * @since 10
1023 */
1024/**
1025 * 2D path object for path drawing
1026 *
1027 * @extends CanvasPath
1028 * @syscap SystemCapability.ArkUI.ArkUI.Full
1029 * @crossplatform
1030 * @form
1031 * @atomicservice
1032 * @since 11
1033 */
1034declare class Path2D extends CanvasPath {
1035  /**
1036   * Adds a path according to the specified path variable.
1037   *
1038   * @param { Path2D } path - Indicates the path object to be added.
1039   * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null.
1040   * @syscap SystemCapability.ArkUI.ArkUI.Full
1041   * @since 8
1042   */
1043  /**
1044   * Adds a path according to the specified path variable.
1045   *
1046   * @param { Path2D } path - Indicates the path object to be added.
1047   * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null.
1048   * @syscap SystemCapability.ArkUI.ArkUI.Full
1049   * @form
1050   * @since 9
1051   */
1052  /**
1053   * Adds a path according to the specified path variable.
1054   *
1055   * @param { Path2D } path - Indicates the path object to be added.
1056   * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null.
1057   * @syscap SystemCapability.ArkUI.ArkUI.Full
1058   * @crossplatform
1059   * @form
1060   * @since 10
1061   */
1062  /**
1063   * Adds a path according to the specified path variable.
1064   *
1065   * @param { Path2D } path - Indicates the path object to be added.
1066   * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null.
1067   * @syscap SystemCapability.ArkUI.ArkUI.Full
1068   * @crossplatform
1069   * @form
1070   * @atomicservice
1071   * @since 11
1072   */
1073  addPath(path: Path2D, transform?: Matrix2D): void;
1074
1075  /**
1076   * Create an empty path object.
1077   *
1078   * @syscap SystemCapability.ArkUI.ArkUI.Full
1079   * @since 8
1080   */
1081  /**
1082   * Create an empty path object.
1083   *
1084   * @syscap SystemCapability.ArkUI.ArkUI.Full
1085   * @form
1086   * @since 9
1087   */
1088  /**
1089   * Create an empty path object.
1090   *
1091   * @syscap SystemCapability.ArkUI.ArkUI.Full
1092   * @crossplatform
1093   * @form
1094   * @since 10
1095   */
1096  /**
1097   * Create an empty path object.
1098   *
1099   * @syscap SystemCapability.ArkUI.ArkUI.Full
1100   * @crossplatform
1101   * @form
1102   * @atomicservice
1103   * @since 11
1104   */
1105  constructor();
1106
1107  /**
1108   * Create an empty path object.
1109   *
1110   * @param { LengthMetricsUnit } [unit] - the unit mode
1111   * @syscap SystemCapability.ArkUI.ArkUI.Full
1112   * @crossplatform
1113   * @form
1114   * @atomicservice
1115   * @since 12
1116   */
1117  constructor(unit: LengthMetricsUnit);
1118
1119  /**
1120   * Create a copy of a path object
1121   *
1122   * @param { Path2D } path - Path object to be copied
1123   * @syscap SystemCapability.ArkUI.ArkUI.Full
1124   * @since 8
1125   */
1126  /**
1127   * Create a copy of a path object
1128   *
1129   * @param { Path2D } path - Path object to be copied
1130   * @syscap SystemCapability.ArkUI.ArkUI.Full
1131   * @form
1132   * @since 9
1133   */
1134  /**
1135   * Create a copy of a path object
1136   *
1137   * @param { Path2D } path - Path object to be copied
1138   * @syscap SystemCapability.ArkUI.ArkUI.Full
1139   * @crossplatform
1140   * @form
1141   * @since 10
1142   */
1143  /**
1144   * Create a copy of a path object
1145   *
1146   * @param { Path2D } path - Path object to be copied
1147   * @syscap SystemCapability.ArkUI.ArkUI.Full
1148   * @crossplatform
1149   * @form
1150   * @atomicservice
1151   * @since 11
1152   */
1153  constructor(path: Path2D);
1154
1155  /**
1156   * Create a copy of a path object
1157   *
1158   * @param { Path2D } path - Path object to be copied
1159   * @param { LengthMetricsUnit } [unit] - the unit mode
1160   * @syscap SystemCapability.ArkUI.ArkUI.Full
1161   * @crossplatform
1162   * @form
1163   * @atomicservice
1164   * @since 12
1165   */
1166  constructor(path: Path2D, unit: LengthMetricsUnit);
1167
1168  /**
1169   * Create a new path according to the description.
1170   *
1171   * @param { string } d - Indicates the path string that compiles with the SVG path description specifications.
1172   * @syscap SystemCapability.ArkUI.ArkUI.Full
1173   * @since 8
1174   */
1175  /**
1176   * Create a new path according to the description.
1177   *
1178   * @param { string } d - Indicates the path string that compiles with the SVG path description specifications.
1179   * @syscap SystemCapability.ArkUI.ArkUI.Full
1180   * @form
1181   * @since 9
1182   */
1183  /**
1184   * Create a new path according to the description.
1185   *
1186   * @param { string } d - Indicates the path string that compiles with the SVG path description specifications.
1187   * @syscap SystemCapability.ArkUI.ArkUI.Full
1188   * @crossplatform
1189   * @form
1190   * @since 10
1191   */
1192  /**
1193   * Create a new path according to the description.
1194   *
1195   * @param { string } d - Indicates the path string that compiles with the SVG path description specifications.
1196   * @syscap SystemCapability.ArkUI.ArkUI.Full
1197   * @crossplatform
1198   * @form
1199   * @atomicservice
1200   * @since 11
1201   */
1202  constructor(d: string);
1203
1204  /**
1205   * Create a new path according to the description.
1206   *
1207   * @param { string } description - Indicates the path string that compiles with the SVG path description specifications.
1208   * @param { LengthMetricsUnit } [unit] - the unit mode
1209   * @syscap SystemCapability.ArkUI.ArkUI.Full
1210   * @crossplatform
1211   * @form
1212   * @atomicservice
1213   * @since 12
1214   */
1215  constructor(description: string, unit: LengthMetricsUnit);
1216}
1217
1218/**
1219 * Describes an opaque object of a template, which is created using the createPattern() method.
1220 *
1221 * @interface CanvasPattern
1222 * @syscap SystemCapability.ArkUI.ArkUI.Full
1223 * @since 8
1224 */
1225/**
1226 * Describes an opaque object of a template, which is created using the createPattern() method.
1227 *
1228 * @interface CanvasPattern
1229 * @syscap SystemCapability.ArkUI.ArkUI.Full
1230 * @form
1231 * @since 9
1232 */
1233/**
1234 * Describes an opaque object of a template, which is created using the createPattern() method.
1235 *
1236 * @interface CanvasPattern
1237 * @syscap SystemCapability.ArkUI.ArkUI.Full
1238 * @crossplatform
1239 * @form
1240 * @since 10
1241 */
1242/**
1243 * Describes an opaque object of a template, which is created using the createPattern() method.
1244 *
1245 * @interface CanvasPattern
1246 * @syscap SystemCapability.ArkUI.ArkUI.Full
1247 * @crossplatform
1248 * @form
1249 * @atomicservice
1250 * @since 11
1251 */
1252declare interface CanvasPattern {
1253  /**
1254   * Adds the matrix transformation effect to the current template.
1255   *
1256   * @param { Matrix2D } transform - transformation matrix. The default value is null.
1257   * @syscap SystemCapability.ArkUI.ArkUI.Full
1258   * @since 8
1259   */
1260  /**
1261   * Adds the matrix transformation effect to the current template.
1262   *
1263   * @param { Matrix2D } transform - transformation matrix. The default value is null.
1264   * @syscap SystemCapability.ArkUI.ArkUI.Full
1265   * @form
1266   * @since 9
1267   */
1268  /**
1269   * Adds the matrix transformation effect to the current template.
1270   *
1271   * @param { Matrix2D } transform - transformation matrix. The default value is null.
1272   * @syscap SystemCapability.ArkUI.ArkUI.Full
1273   * @crossplatform
1274   * @form
1275   * @since 10
1276   */
1277  /**
1278   * Adds the matrix transformation effect to the current template.
1279   *
1280   * @param { Matrix2D } transform - transformation matrix. The default value is null.
1281   * @syscap SystemCapability.ArkUI.ArkUI.Full
1282   * @crossplatform
1283   * @form
1284   * @atomicservice
1285   * @since 11
1286   */
1287  setTransform(transform?: Matrix2D): void;
1288}
1289
1290/**
1291 * Size information of the text
1292 *
1293 * @interface TextMetrics
1294 * @syscap SystemCapability.ArkUI.ArkUI.Full
1295 * @since 8
1296 */
1297/**
1298 * Size information of the text
1299 *
1300 * @interface TextMetrics
1301 * @syscap SystemCapability.ArkUI.ArkUI.Full
1302 * @form
1303 * @since 9
1304 */
1305/**
1306 * Size information of the text
1307 *
1308 * @interface TextMetrics
1309 * @syscap SystemCapability.ArkUI.ArkUI.Full
1310 * @crossplatform
1311 * @form
1312 * @since 10
1313 */
1314/**
1315 * Size information of the text
1316 *
1317 * @interface TextMetrics
1318 * @syscap SystemCapability.ArkUI.ArkUI.Full
1319 * @crossplatform
1320 * @form
1321 * @atomicservice
1322 * @since 11
1323 */
1324declare interface TextMetrics {
1325  /**
1326   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of
1327   *    the rectangular boundary of the rendered text.
1328   *
1329   * @type { number }
1330   * @syscap SystemCapability.ArkUI.ArkUI.Full
1331   * @since 8
1332   */
1333  /**
1334   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of
1335   *    the rectangular boundary of the rendered text.
1336   *
1337   * @type { number }
1338   * @syscap SystemCapability.ArkUI.ArkUI.Full
1339   * @form
1340   * @since 9
1341   */
1342  /**
1343   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of
1344   *    the rectangular boundary of the rendered text.
1345   *
1346   * @type { number }
1347   * @syscap SystemCapability.ArkUI.ArkUI.Full
1348   * @crossplatform
1349   * @form
1350   * @since 10
1351   */
1352  /**
1353   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of
1354   *    the rectangular boundary of the rendered text.
1355   *
1356   * @type { number }
1357   * @syscap SystemCapability.ArkUI.ArkUI.Full
1358   * @crossplatform
1359   * @form
1360   * @atomicservice
1361   * @since 11
1362   */
1363  readonly actualBoundingBoxAscent: number;
1364
1365  /**
1366   * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of
1367   *    the rectangular boundary of the rendered text.
1368   *
1369   * @type { number }
1370   * @syscap SystemCapability.ArkUI.ArkUI.Full
1371   * @since 8
1372   */
1373  /**
1374   * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of
1375   *    the rectangular boundary of the rendered text.
1376   *
1377   * @type { number }
1378   * @syscap SystemCapability.ArkUI.ArkUI.Full
1379   * @form
1380   * @since 9
1381   */
1382  /**
1383   * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of
1384   *    the rectangular boundary of the rendered text.
1385   *
1386   * @type { number }
1387   * @syscap SystemCapability.ArkUI.ArkUI.Full
1388   * @crossplatform
1389   * @form
1390   * @since 10
1391   */
1392  /**
1393   * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of
1394   *    the rectangular boundary of the rendered text.
1395   *
1396   * @type { number }
1397   * @syscap SystemCapability.ArkUI.ArkUI.Full
1398   * @crossplatform
1399   * @form
1400   * @atomicservice
1401   * @since 11
1402   */
1403  readonly actualBoundingBoxDescent: number;
1404
1405  /**
1406   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1407   *    the left of the text rectangle boundary.
1408   *
1409   * @type { number }
1410   * @syscap SystemCapability.ArkUI.ArkUI.Full
1411   * @since 8
1412   */
1413  /**
1414   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1415   *    the left of the text rectangle boundary.
1416   *
1417   * @type { number }
1418   * @syscap SystemCapability.ArkUI.ArkUI.Full
1419   * @form
1420   * @since 9
1421   */
1422  /**
1423   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1424   *    the left of the text rectangle boundary.
1425   *
1426   * @type { number }
1427   * @syscap SystemCapability.ArkUI.ArkUI.Full
1428   * @crossplatform
1429   * @form
1430   * @since 10
1431   */
1432  /**
1433   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1434   *    the left of the text rectangle boundary.
1435   *
1436   * @type { number }
1437   * @syscap SystemCapability.ArkUI.ArkUI.Full
1438   * @crossplatform
1439   * @form
1440   * @atomicservice
1441   * @since 11
1442   */
1443  readonly actualBoundingBoxLeft: number;
1444
1445  /**
1446   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1447   *    the right of the text rectangle boundary.
1448   *
1449   * @type { number }
1450   * @syscap SystemCapability.ArkUI.ArkUI.Full
1451   * @since 8
1452   */
1453  /**
1454   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1455   *    the right of the text rectangle boundary.
1456   *
1457   * @type { number }
1458   * @syscap SystemCapability.ArkUI.ArkUI.Full
1459   * @form
1460   * @since 9
1461   */
1462  /**
1463   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1464   *    the right of the text rectangle boundary.
1465   *
1466   * @type { number }
1467   * @syscap SystemCapability.ArkUI.ArkUI.Full
1468   * @crossplatform
1469   * @form
1470   * @since 10
1471   */
1472  /**
1473   * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to
1474   *    the right of the text rectangle boundary.
1475   *
1476   * @type { number }
1477   * @syscap SystemCapability.ArkUI.ArkUI.Full
1478   * @crossplatform
1479   * @form
1480   * @atomicservice
1481   * @since 11
1482   */
1483  readonly actualBoundingBoxRight: number;
1484
1485  /**
1486   * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of
1487   *    the wireframe.
1488   *
1489   * @type { number }
1490   * @syscap SystemCapability.ArkUI.ArkUI.Full
1491   * @since 8
1492   */
1493  /**
1494   * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of
1495   *    the wireframe.
1496   *
1497   * @type { number }
1498   * @syscap SystemCapability.ArkUI.ArkUI.Full
1499   * @form
1500   * @since 9
1501   */
1502  /**
1503   * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of
1504   *    the wireframe.
1505   *
1506   * @type { number }
1507   * @syscap SystemCapability.ArkUI.ArkUI.Full
1508   * @crossplatform
1509   * @form
1510   * @since 10
1511   */
1512  /**
1513   * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of
1514   *    the wireframe.
1515   *
1516   * @type { number }
1517   * @syscap SystemCapability.ArkUI.ArkUI.Full
1518   * @crossplatform
1519   * @form
1520   * @atomicservice
1521   * @since 11
1522   */
1523  readonly alphabeticBaseline: number;
1524
1525  /**
1526   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the
1527   *    em square in the wireframe.
1528   *
1529   * @type { number }
1530   * @syscap SystemCapability.ArkUI.ArkUI.Full
1531   * @since 8
1532   */
1533  /**
1534   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the
1535   *    em square in the wireframe.
1536   *
1537   * @type { number }
1538   * @syscap SystemCapability.ArkUI.ArkUI.Full
1539   * @form
1540   * @since 9
1541   */
1542  /**
1543   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the
1544   *    em square in the wireframe.
1545   *
1546   * @type { number }
1547   * @syscap SystemCapability.ArkUI.ArkUI.Full
1548   * @crossplatform
1549   * @form
1550   * @since 10
1551   */
1552  /**
1553   * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the
1554   *    em square in the wireframe.
1555   *
1556   * @type { number }
1557   * @syscap SystemCapability.ArkUI.ArkUI.Full
1558   * @crossplatform
1559   * @form
1560   * @atomicservice
1561   * @since 11
1562   */
1563  readonly emHeightAscent: number;
1564
1565  /**
1566   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1567   *    em box in the wireframe.
1568   *
1569   * @type { number }
1570   * @syscap SystemCapability.ArkUI.ArkUI.Full
1571   * @since 8
1572   */
1573  /**
1574   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1575   *    em box in the wireframe.
1576   *
1577   * @type { number }
1578   * @syscap SystemCapability.ArkUI.ArkUI.Full
1579   * @form
1580   * @since 9
1581   */
1582  /**
1583   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1584   *    em box in the wireframe.
1585   *
1586   * @type { number }
1587   * @syscap SystemCapability.ArkUI.ArkUI.Full
1588   * @crossplatform
1589   * @form
1590   * @since 10
1591   */
1592  /**
1593   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1594   *    em box in the wireframe.
1595   *
1596   * @type { number }
1597   * @syscap SystemCapability.ArkUI.ArkUI.Full
1598   * @crossplatform
1599   * @form
1600   * @atomicservice
1601   * @since 11
1602   */
1603  readonly emHeightDescent: number;
1604
1605  /**
1606   * Double, distance from the horizontal line indicated by the textBaseline property to the top of the
1607   *    highest rectangle boundary of all fonts rendering text.
1608   *
1609   * @type { number }
1610   * @syscap SystemCapability.ArkUI.ArkUI.Full
1611   * @since 8
1612   */
1613  /**
1614   * Double, distance from the horizontal line indicated by the textBaseline property to the top of the
1615   *    highest rectangle boundary of all fonts rendering text.
1616   *
1617   * @type { number }
1618   * @syscap SystemCapability.ArkUI.ArkUI.Full
1619   * @form
1620   * @since 9
1621   */
1622  /**
1623   * Double, distance from the horizontal line indicated by the textBaseline property to the top of the
1624   *    highest rectangle boundary of all fonts rendering text.
1625   *
1626   * @type { number }
1627   * @syscap SystemCapability.ArkUI.ArkUI.Full
1628   * @crossplatform
1629   * @form
1630   * @since 10
1631   */
1632  /**
1633   * Double, distance from the horizontal line indicated by the textBaseline property to the top of the
1634   *    highest rectangle boundary of all fonts rendering text.
1635   *
1636   * @type { number }
1637   * @syscap SystemCapability.ArkUI.ArkUI.Full
1638   * @crossplatform
1639   * @form
1640   * @atomicservice
1641   * @since 11
1642   */
1643  readonly fontBoundingBoxAscent: number;
1644
1645  /**
1646   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1647   *   rectangular boundary of all fonts rendering text.
1648   *
1649   * @type { number }
1650   * @syscap SystemCapability.ArkUI.ArkUI.Full
1651   * @since 8
1652   */
1653  /**
1654   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1655   *   rectangular boundary of all fonts rendering text.
1656   *
1657   * @type { number }
1658   * @syscap SystemCapability.ArkUI.ArkUI.Full
1659   * @form
1660   * @since 9
1661   */
1662  /**
1663   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1664   *   rectangular boundary of all fonts rendering text.
1665   *
1666   * @type { number }
1667   * @syscap SystemCapability.ArkUI.ArkUI.Full
1668   * @crossplatform
1669   * @form
1670   * @since 10
1671   */
1672  /**
1673   * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the
1674   *   rectangular boundary of all fonts rendering text.
1675   *
1676   * @type { number }
1677   * @syscap SystemCapability.ArkUI.ArkUI.Full
1678   * @crossplatform
1679   * @form
1680   * @atomicservice
1681   * @since 11
1682   */
1683  readonly fontBoundingBoxDescent: number;
1684
1685  /**
1686   * Double, distance from the horizontal line indicated by the textBaseline property to
1687   *    the hanging baseline of the wireframe.
1688   *
1689   * @type { number }
1690   * @syscap SystemCapability.ArkUI.ArkUI.Full
1691   * @since 8
1692   */
1693  /**
1694   * Double, distance from the horizontal line indicated by the textBaseline property to
1695   *    the hanging baseline of the wireframe.
1696   *
1697   * @type { number }
1698   * @syscap SystemCapability.ArkUI.ArkUI.Full
1699   * @form
1700   * @since 9
1701   */
1702  /**
1703   * Double, distance from the horizontal line indicated by the textBaseline property to
1704   *    the hanging baseline of the wireframe.
1705   *
1706   * @type { number }
1707   * @syscap SystemCapability.ArkUI.ArkUI.Full
1708   * @crossplatform
1709   * @form
1710   * @since 10
1711   */
1712  /**
1713   * Double, distance from the horizontal line indicated by the textBaseline property to
1714   *    the hanging baseline of the wireframe.
1715   *
1716   * @type { number }
1717   * @syscap SystemCapability.ArkUI.ArkUI.Full
1718   * @crossplatform
1719   * @form
1720   * @atomicservice
1721   * @since 11
1722   */
1723  readonly hangingBaseline: number;
1724
1725  /**
1726   * Double, distance from the horizontal line indicated by the textBaseline property to
1727   *    the ideographic baseline of the wireframe.
1728   *
1729   * @type { number }
1730   * @syscap SystemCapability.ArkUI.ArkUI.Full
1731   * @since 8
1732   */
1733  /**
1734   * Double, distance from the horizontal line indicated by the textBaseline property to
1735   *    the ideographic baseline of the wireframe.
1736   *
1737   * @type { number }
1738   * @syscap SystemCapability.ArkUI.ArkUI.Full
1739   * @form
1740   * @since 9
1741   */
1742  /**
1743   * Double, distance from the horizontal line indicated by the textBaseline property to
1744   *    the ideographic baseline of the wireframe.
1745   *
1746   * @type { number }
1747   * @syscap SystemCapability.ArkUI.ArkUI.Full
1748   * @crossplatform
1749   * @form
1750   * @since 10
1751   */
1752  /**
1753   * Double, distance from the horizontal line indicated by the textBaseline property to
1754   *    the ideographic baseline of the wireframe.
1755   *
1756   * @type { number }
1757   * @syscap SystemCapability.ArkUI.ArkUI.Full
1758   * @crossplatform
1759   * @form
1760   * @atomicservice
1761   * @since 11
1762   */
1763  readonly ideographicBaseline: number;
1764
1765  /**
1766   * Indicates the width of a character string. The value is of the double type.
1767   *
1768   * @type { number }
1769   * @syscap SystemCapability.ArkUI.ArkUI.Full
1770   * @since 8
1771   */
1772  /**
1773   * Indicates the width of a character string. The value is of the double type.
1774   *
1775   * @type { number }
1776   * @syscap SystemCapability.ArkUI.ArkUI.Full
1777   * @form
1778   * @since 9
1779   */
1780  /**
1781   * Indicates the width of a character string. The value is of the double type.
1782   *
1783   * @type { number }
1784   * @syscap SystemCapability.ArkUI.ArkUI.Full
1785   * @crossplatform
1786   * @form
1787   * @since 10
1788   */
1789  /**
1790   * Indicates the width of a character string. The value is of the double type.
1791   *
1792   * @type { number }
1793   * @syscap SystemCapability.ArkUI.ArkUI.Full
1794   * @crossplatform
1795   * @form
1796   * @atomicservice
1797   * @since 11
1798   */
1799  readonly width: number;
1800
1801  /**
1802   * Indicates the height of a character string. The value is of the double type.
1803   *
1804   * @type { number }
1805   * @syscap SystemCapability.ArkUI.ArkUI.Full
1806   * @since 8
1807   */
1808  /**
1809   * Indicates the height of a character string. The value is of the double type.
1810   *
1811   * @type { number }
1812   * @syscap SystemCapability.ArkUI.ArkUI.Full
1813   * @form
1814   * @since 9
1815   */
1816  /**
1817   * Indicates the height of a character string. The value is of the double type.
1818   *
1819   * @type { number }
1820   * @syscap SystemCapability.ArkUI.ArkUI.Full
1821   * @crossplatform
1822   * @form
1823   * @since 10
1824   */
1825  /**
1826   * Indicates the height of a character string. The value is of the double type.
1827   *
1828   * @type { number }
1829   * @syscap SystemCapability.ArkUI.ArkUI.Full
1830   * @crossplatform
1831   * @form
1832   * @atomicservice
1833   * @since 11
1834   */
1835  readonly height: number;
1836}
1837
1838/**
1839 * Bitmap image object that can be drawn onto the current Canvas
1840 *
1841 * @syscap SystemCapability.ArkUI.ArkUI.Full
1842 * @since 8
1843 */
1844/**
1845 * Bitmap image object that can be drawn onto the current Canvas
1846 *
1847 * @syscap SystemCapability.ArkUI.ArkUI.Full
1848 * @form
1849 * @since 9
1850 */
1851/**
1852 * Bitmap image object that can be drawn onto the current Canvas
1853 *
1854 * @syscap SystemCapability.ArkUI.ArkUI.Full
1855 * @crossplatform
1856 * @form
1857 * @since 10
1858 */
1859/**
1860 * Bitmap image object that can be drawn onto the current Canvas
1861 *
1862 * @syscap SystemCapability.ArkUI.ArkUI.Full
1863 * @crossplatform
1864 * @form
1865 * @atomicservice
1866 * @since 11
1867 */
1868declare class ImageBitmap {
1869  /**
1870   * Indicates the height of the CSS pixel unit of ImageData.
1871   *
1872   * @type { number }
1873   * @syscap SystemCapability.ArkUI.ArkUI.Full
1874   * @since 8
1875   */
1876  /**
1877   * Indicates the height of the CSS pixel unit of ImageData.
1878   *
1879   * @type { number }
1880   * @syscap SystemCapability.ArkUI.ArkUI.Full
1881   * @form
1882   * @since 9
1883   */
1884  /**
1885   * Indicates the height of the CSS pixel unit of ImageData.
1886   *
1887   * @type { number }
1888   * @syscap SystemCapability.ArkUI.ArkUI.Full
1889   * @crossplatform
1890   * @form
1891   * @since 10
1892   */
1893  /**
1894   * Indicates the height of the CSS pixel unit of ImageData.
1895   *
1896   * @type { number }
1897   * @syscap SystemCapability.ArkUI.ArkUI.Full
1898   * @crossplatform
1899   * @form
1900   * @atomicservice
1901   * @since 11
1902   */
1903  readonly height: number;
1904
1905  /**
1906   * Indicates the width of the CSS pixel unit of ImageData.
1907   *
1908   * @type { number }
1909   * @syscap SystemCapability.ArkUI.ArkUI.Full
1910   * @since 8
1911   */
1912  /**
1913   * Indicates the width of the CSS pixel unit of ImageData.
1914   *
1915   * @type { number }
1916   * @syscap SystemCapability.ArkUI.ArkUI.Full
1917   * @form
1918   * @since 9
1919   */
1920  /**
1921   * Indicates the width of the CSS pixel unit of ImageData.
1922   *
1923   * @type { number }
1924   * @syscap SystemCapability.ArkUI.ArkUI.Full
1925   * @crossplatform
1926   * @form
1927   * @since 10
1928   */
1929  /**
1930   * Indicates the width of the CSS pixel unit of ImageData.
1931   *
1932   * @type { number }
1933   * @syscap SystemCapability.ArkUI.ArkUI.Full
1934   * @crossplatform
1935   * @form
1936   * @atomicservice
1937   * @since 11
1938   */
1939  readonly width: number;
1940
1941  /**
1942   * Releases all graphics resources associated with an ImageBitmap.
1943   *
1944   * @syscap SystemCapability.ArkUI.ArkUI.Full
1945   * @since 8
1946   */
1947  /**
1948   * Releases all graphics resources associated with an ImageBitmap.
1949   *
1950   * @syscap SystemCapability.ArkUI.ArkUI.Full
1951   * @form
1952   * @since 9
1953   */
1954  /**
1955   * Releases all graphics resources associated with an ImageBitmap.
1956   *
1957   * @syscap SystemCapability.ArkUI.ArkUI.Full
1958   * @crossplatform
1959   * @form
1960   * @since 10
1961   */
1962  /**
1963   * Releases all graphics resources associated with an ImageBitmap.
1964   *
1965   * @syscap SystemCapability.ArkUI.ArkUI.Full
1966   * @crossplatform
1967   * @form
1968   * @atomicservice
1969   * @since 11
1970   */
1971  close(): void;
1972
1973  /**
1974   * Create an ImageBitmap object based on the transferred image path.
1975   *
1976   * @param { string } src - Path of the image object.
1977   * @syscap SystemCapability.ArkUI.ArkUI.Full
1978   * @since 8
1979   */
1980  /**
1981   * Create an ImageBitmap object based on the transferred image path.
1982   *
1983   * @param { string } src - Path of the image object.
1984   * @syscap SystemCapability.ArkUI.ArkUI.Full
1985   * @form
1986   * @since 9
1987   */
1988  /**
1989   * Create an ImageBitmap object based on the transferred image path.
1990   *
1991   * @param { string } src - Path of the image object.
1992   * @syscap SystemCapability.ArkUI.ArkUI.Full
1993   * @crossplatform
1994   * @form
1995   * @since 10
1996   */
1997  /**
1998   * Create an ImageBitmap object based on the transferred image path.
1999   *
2000   * @param { string } src - Path of the image object.
2001   * @syscap SystemCapability.ArkUI.ArkUI.Full
2002   * @crossplatform
2003   * @form
2004   * @atomicservice
2005   * @since 11
2006   */
2007  constructor(src: string);
2008
2009  /**
2010   * Create an ImageBitmap object based on the transferred image path.
2011   *
2012   * @param { string } src - Path of the image object.
2013   * @param { LengthMetricsUnit } [unit] - the unit mode
2014   * @syscap SystemCapability.ArkUI.ArkUI.Full
2015   * @crossplatform
2016   * @form
2017   * @atomicservice
2018   * @since 12
2019   */
2020  constructor(src: string, unit: LengthMetricsUnit);
2021
2022  /**
2023   * Transfer a PixelMap object to construct an ImageBitmap object.
2024   *
2025   * @param { PixelMap } data - PixelMap object
2026   * @syscap SystemCapability.ArkUI.ArkUI.Full
2027   * @since 8
2028   */
2029  /**
2030   * Transfer a PixelMap object to construct an ImageBitmap object.
2031   *
2032   * @param { PixelMap } data - PixelMap object
2033   * @syscap SystemCapability.ArkUI.ArkUI.Full
2034   * @crossplatform
2035   * @since 10
2036   */
2037  /**
2038   * Transfer a PixelMap object to construct an ImageBitmap object.
2039   *
2040   * @param { PixelMap } data - PixelMap object
2041   * @syscap SystemCapability.ArkUI.ArkUI.Full
2042   * @crossplatform
2043   * @atomicservice
2044   * @since 11
2045   */
2046  constructor(data: PixelMap);
2047
2048  /**
2049   * Transfer a PixelMap object to construct an ImageBitmap object.
2050   *
2051   * @param { PixelMap } data - PixelMap object
2052   * @param { LengthMetricsUnit } [unit] - the unit mode
2053   * @syscap SystemCapability.ArkUI.ArkUI.Full
2054   * @crossplatform
2055   * @atomicservice
2056   * @since 12
2057   */
2058  constructor(data: PixelMap, unit: LengthMetricsUnit);
2059}
2060
2061/**
2062 * Image data object
2063 *
2064 * @syscap SystemCapability.ArkUI.ArkUI.Full
2065 * @since 8
2066 */
2067/**
2068 * Image data object
2069 *
2070 * @syscap SystemCapability.ArkUI.ArkUI.Full
2071 * @form
2072 * @since 9
2073 */
2074/**
2075 * Image data object
2076 *
2077 * @syscap SystemCapability.ArkUI.ArkUI.Full
2078 * @crossplatform
2079 * @form
2080 * @since 10
2081 */
2082/**
2083 * Image data object
2084 *
2085 * @syscap SystemCapability.ArkUI.ArkUI.Full
2086 * @crossplatform
2087 * @form
2088 * @atomicservice
2089 * @since 11
2090 */
2091declare class ImageData {
2092  /**
2093   * Array containing image pixel data
2094   *
2095   * @type { Uint8ClampedArray }
2096   * @syscap SystemCapability.ArkUI.ArkUI.Full
2097   * @since 8
2098   */
2099  /**
2100   * Array containing image pixel data
2101   *
2102   * @type { Uint8ClampedArray }
2103   * @syscap SystemCapability.ArkUI.ArkUI.Full
2104   * @form
2105   * @since 9
2106   */
2107  /**
2108   * Array containing image pixel data
2109   *
2110   * @type { Uint8ClampedArray }
2111   * @syscap SystemCapability.ArkUI.ArkUI.Full
2112   * @crossplatform
2113   * @form
2114   * @since 10
2115   */
2116  /**
2117   * Array containing image pixel data
2118   *
2119   * @type { Uint8ClampedArray }
2120   * @syscap SystemCapability.ArkUI.ArkUI.Full
2121   * @crossplatform
2122   * @form
2123   * @atomicservice
2124   * @since 11
2125   */
2126  readonly data: Uint8ClampedArray;
2127
2128  /**
2129   * Width of the image.
2130   *
2131   * @type { number }
2132   * @syscap SystemCapability.ArkUI.ArkUI.Full
2133   * @since 8
2134   */
2135  /**
2136   * Width of the image.
2137   *
2138   * @type { number }
2139   * @syscap SystemCapability.ArkUI.ArkUI.Full
2140   * @form
2141   * @since 9
2142   */
2143  /**
2144   * Width of the image.
2145   *
2146   * @type { number }
2147   * @syscap SystemCapability.ArkUI.ArkUI.Full
2148   * @crossplatform
2149   * @form
2150   * @since 10
2151   */
2152  /**
2153   * Width of the image.
2154   *
2155   * @type { number }
2156   * @syscap SystemCapability.ArkUI.ArkUI.Full
2157   * @crossplatform
2158   * @form
2159   * @atomicservice
2160   * @since 11
2161   */
2162  readonly height: number;
2163
2164  /**
2165   * Height of the image.
2166   *
2167   * @type { number }
2168   * @syscap SystemCapability.ArkUI.ArkUI.Full
2169   * @since 8
2170   */
2171  /**
2172   * Height of the image.
2173   *
2174   * @type { number }
2175   * @syscap SystemCapability.ArkUI.ArkUI.Full
2176   * @form
2177   * @since 9
2178   */
2179  /**
2180   * Height of the image.
2181   *
2182   * @type { number }
2183   * @syscap SystemCapability.ArkUI.ArkUI.Full
2184   * @crossplatform
2185   * @form
2186   * @since 10
2187   */
2188  /**
2189   * Height of the image.
2190   *
2191   * @type { number }
2192   * @syscap SystemCapability.ArkUI.ArkUI.Full
2193   * @crossplatform
2194   * @form
2195   * @atomicservice
2196   * @since 11
2197   */
2198  readonly width: number;
2199
2200  /**
2201   * Create an ImageData object based on the input parameters.
2202   *
2203   * @param { number } width - Width of the image.
2204   * @param { number } height - Height of the image.
2205   * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image.
2206   * @syscap SystemCapability.ArkUI.ArkUI.Full
2207   * @since 8
2208   */
2209  /**
2210   * Create an ImageData object based on the input parameters.
2211   *
2212   * @param { number } width - Width of the image.
2213   * @param { number } height - Height of the image.
2214   * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image.
2215   * @syscap SystemCapability.ArkUI.ArkUI.Full
2216   * @form
2217   * @since 9
2218   */
2219  /**
2220   * Create an ImageData object based on the input parameters.
2221   *
2222   * @param { number } width - Width of the image.
2223   * @param { number } height - Height of the image.
2224   * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image.
2225   * @syscap SystemCapability.ArkUI.ArkUI.Full
2226   * @crossplatform
2227   * @form
2228   * @since 10
2229   */
2230  /**
2231   * Create an ImageData object based on the input parameters.
2232   *
2233   * @param { number } width - Width of the image.
2234   * @param { number } height - Height of the image.
2235   * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image.
2236   * @syscap SystemCapability.ArkUI.ArkUI.Full
2237   * @crossplatform
2238   * @form
2239   * @atomicservice
2240   * @since 11
2241   */
2242  constructor(width: number, height: number, data?: Uint8ClampedArray);
2243
2244  /**
2245   * Create an ImageData object based on the input parameters.
2246   *
2247   * @param { number } width - Width of the image.
2248   * @param { number } height - Height of the image.
2249   * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image.
2250   * @param { LengthMetricsUnit } [unit] - the unit mode
2251   * @syscap SystemCapability.ArkUI.ArkUI.Full
2252   * @crossplatform
2253   * @form
2254   * @atomicservice
2255   * @since 12
2256   */
2257  constructor(width: number, height: number, data?: Uint8ClampedArray, unit?: LengthMetricsUnit);
2258}
2259
2260/**
2261 * This object allows you to set properties when creating a rendering context
2262 *
2263 * @syscap SystemCapability.ArkUI.ArkUI.Full
2264 * @since 8
2265 */
2266/**
2267 * This object allows you to set properties when creating a rendering context
2268 *
2269 * @syscap SystemCapability.ArkUI.ArkUI.Full
2270 * @form
2271 * @since 9
2272 */
2273/**
2274 * This object allows you to set properties when creating a rendering context
2275 *
2276 * @syscap SystemCapability.ArkUI.ArkUI.Full
2277 * @crossplatform
2278 * @form
2279 * @since 10
2280 */
2281/**
2282 * This object allows you to set properties when creating a rendering context
2283 *
2284 * @syscap SystemCapability.ArkUI.ArkUI.Full
2285 * @crossplatform
2286 * @form
2287 * @atomicservice
2288 * @since 11
2289 */
2290declare class RenderingContextSettings {
2291  /**
2292   * Indicates whether anti-aliasing is enabled for canvas. The default value is false.
2293   *
2294   * @type { ?boolean }
2295   * @syscap SystemCapability.ArkUI.ArkUI.Full
2296   * @since 8
2297   */
2298  /**
2299   * Indicates whether anti-aliasing is enabled for canvas. The default value is false.
2300   *
2301   * @type { ?boolean }
2302   * @syscap SystemCapability.ArkUI.ArkUI.Full
2303   * @form
2304   * @since 9
2305   */
2306  /**
2307   * Indicates whether anti-aliasing is enabled for canvas. The default value is false.
2308   *
2309   * @type { ?boolean }
2310   * @syscap SystemCapability.ArkUI.ArkUI.Full
2311   * @crossplatform
2312   * @form
2313   * @since 10
2314   */
2315  /**
2316   * Indicates whether anti-aliasing is enabled for canvas. The default value is false.
2317   *
2318   * @type { ?boolean }
2319   * @syscap SystemCapability.ArkUI.ArkUI.Full
2320   * @crossplatform
2321   * @form
2322   * @atomicservice
2323   * @since 11
2324   */
2325  antialias?: boolean;
2326
2327  /**
2328   * Create an RenderingContextSettings object based on the antialias and alpha.
2329   *
2330   * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas
2331   * @syscap SystemCapability.ArkUI.ArkUI.Full
2332   * @since 8
2333   */
2334  /**
2335   * Create an RenderingContextSettings object based on the antialias and alpha.
2336   *
2337   * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas
2338   * @syscap SystemCapability.ArkUI.ArkUI.Full
2339   * @form
2340   * @since 9
2341   */
2342  /**
2343   * Create an RenderingContextSettings object based on the antialias and alpha.
2344   *
2345   * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas
2346   * @syscap SystemCapability.ArkUI.ArkUI.Full
2347   * @crossplatform
2348   * @form
2349   * @since 10
2350   */
2351  /**
2352   * Create an RenderingContextSettings object based on the antialias and alpha.
2353   *
2354   * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas
2355   * @syscap SystemCapability.ArkUI.ArkUI.Full
2356   * @crossplatform
2357   * @form
2358   * @atomicservice
2359   * @since 11
2360   */
2361  constructor(antialias?: boolean);
2362}
2363
2364/**
2365 * Canvas renderer for drawing shapes, text, images and other objects
2366 *
2367 * @extends CanvasPath
2368 * @syscap SystemCapability.ArkUI.ArkUI.Full
2369 * @since 8
2370 */
2371/**
2372 * Canvas renderer for drawing shapes, text, images and other objects
2373 *
2374 * @extends CanvasPath
2375 * @syscap SystemCapability.ArkUI.ArkUI.Full
2376 * @form
2377 * @since 9
2378 */
2379/**
2380 * Canvas renderer for drawing shapes, text, images and other objects
2381 *
2382 * @extends CanvasPath
2383 * @syscap SystemCapability.ArkUI.ArkUI.Full
2384 * @crossplatform
2385 * @form
2386 * @since 10
2387 */
2388/**
2389 * Canvas renderer for drawing shapes, text, images and other objects
2390 *
2391 * @extends CanvasPath
2392 * @syscap SystemCapability.ArkUI.ArkUI.Full
2393 * @crossplatform
2394 * @form
2395 * @atomicservice
2396 * @since 11
2397 */
2398declare class CanvasRenderer extends CanvasPath {
2399  /**
2400   * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque).
2401   *    If the value is out of range, the assignment is invalid.
2402   *
2403   * @type { number }
2404   * @default 1.0
2405   * @syscap SystemCapability.ArkUI.ArkUI.Full
2406   * @since 8
2407   */
2408  /**
2409   * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque).
2410   *    If the value is out of range, the assignment is invalid.
2411   *
2412   * @type { number }
2413   * @default 1.0
2414   * @syscap SystemCapability.ArkUI.ArkUI.Full
2415   * @form
2416   * @since 9
2417   */
2418  /**
2419   * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque).
2420   *    If the value is out of range, the assignment is invalid.
2421   *
2422   * @type { number }
2423   * @default 1.0
2424   * @syscap SystemCapability.ArkUI.ArkUI.Full
2425   * @crossplatform
2426   * @form
2427   * @since 10
2428   */
2429  /**
2430   * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque).
2431   *    If the value is out of range, the assignment is invalid.
2432   *
2433   * @type { number }
2434   * @default 1.0
2435   * @syscap SystemCapability.ArkUI.ArkUI.Full
2436   * @crossplatform
2437   * @form
2438   * @atomicservice
2439   * @since 11
2440   */
2441  globalAlpha: number;
2442
2443  /**
2444   * Type of composition operation applied when drawing a new shape. The following types are supported:
2445   * source-over: (Default) Draws a new drawing on top of an existing canvas context.
2446   * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas.
2447   *    Everything else is transparent.
2448   * source-out: Draws a new drawing where it does not overlap with the existing canvas content.
2449   * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas.
2450   * destination-over: Draws a new graphic behind the existing canvas content.
2451   * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content.
2452   *    Everything else is transparent.
2453   * destination-out: Existing content remains where the new drawing does not overlap.
2454   * destination-atop: The existing canvas retains only the part that overlaps with the new drawing,
2455   *    which is drawn behind the canvas content.
2456   * lighter: The color of two overlapping shapes is determined by adding the color values.
2457   * copy: Only new graphics are displayed.
2458   * xor: In the image, those overlaps and other places outside of the normal drawing are transparent.
2459   *
2460   * @type { string }
2461   * @default source-over
2462   * @syscap SystemCapability.ArkUI.ArkUI.Full
2463   * @since 8
2464   */
2465  /**
2466   * Type of composition operation applied when drawing a new shape. The following types are supported:
2467   * source-over: (Default) Draws a new drawing on top of an existing canvas context.
2468   * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas.
2469   *    Everything else is transparent.
2470   * source-out: Draws a new drawing where it does not overlap with the existing canvas content.
2471   * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas.
2472   * destination-over: Draws a new graphic behind the existing canvas content.
2473   * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content.
2474   *    Everything else is transparent.
2475   * destination-out: Existing content remains where the new drawing does not overlap.
2476   * destination-atop: The existing canvas retains only the part that overlaps with the new drawing,
2477   *    which is drawn behind the canvas content.
2478   * lighter: The color of two overlapping shapes is determined by adding the color values.
2479   * copy: Only new graphics are displayed.
2480   * xor: In the image, those overlaps and other places outside of the normal drawing are transparent.
2481   *
2482   * @type { string }
2483   * @default source-over
2484   * @syscap SystemCapability.ArkUI.ArkUI.Full
2485   * @form
2486   * @since 9
2487   */
2488  /**
2489   * Type of composition operation applied when drawing a new shape. The following types are supported:
2490   * source-over: (Default) Draws a new drawing on top of an existing canvas context.
2491   * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas.
2492   *    Everything else is transparent.
2493   * source-out: Draws a new drawing where it does not overlap with the existing canvas content.
2494   * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas.
2495   * destination-over: Draws a new graphic behind the existing canvas content.
2496   * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content.
2497   *    Everything else is transparent.
2498   * destination-out: Existing content remains where the new drawing does not overlap.
2499   * destination-atop: The existing canvas retains only the part that overlaps with the new drawing,
2500   *    which is drawn behind the canvas content.
2501   * lighter: The color of two overlapping shapes is determined by adding the color values.
2502   * copy: Only new graphics are displayed.
2503   * xor: In the image, those overlaps and other places outside of the normal drawing are transparent.
2504   *
2505   * @type { string }
2506   * @default source-over
2507   * @syscap SystemCapability.ArkUI.ArkUI.Full
2508   * @crossplatform
2509   * @form
2510   * @since 10
2511   */
2512  /**
2513   * Type of composition operation applied when drawing a new shape. The following types are supported:
2514   * source-over: (Default) Draws a new drawing on top of an existing canvas context.
2515   * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas.
2516   *    Everything else is transparent.
2517   * source-out: Draws a new drawing where it does not overlap with the existing canvas content.
2518   * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas.
2519   * destination-over: Draws a new graphic behind the existing canvas content.
2520   * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content.
2521   *    Everything else is transparent.
2522   * destination-out: Existing content remains where the new drawing does not overlap.
2523   * destination-atop: The existing canvas retains only the part that overlaps with the new drawing,
2524   *    which is drawn behind the canvas content.
2525   * lighter: The color of two overlapping shapes is determined by adding the color values.
2526   * copy: Only new graphics are displayed.
2527   * xor: In the image, those overlaps and other places outside of the normal drawing are transparent.
2528   *
2529   * @type { string }
2530   * @default source-over
2531   * @syscap SystemCapability.ArkUI.ArkUI.Full
2532   * @crossplatform
2533   * @form
2534   * @atomicservice
2535   * @since 11
2536   */
2537  globalCompositeOperation: string;
2538
2539  /**
2540   * Draw an image on a canvas
2541   *
2542   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2543   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2544   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2545   * @syscap SystemCapability.ArkUI.ArkUI.Full
2546   * @since 8
2547   */
2548  /**
2549   * Draw an image on a canvas
2550   *
2551   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2552   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2553   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2554   * @syscap SystemCapability.ArkUI.ArkUI.Full
2555   * @form
2556   * @since 9
2557   */
2558  /**
2559   * Draw an image on a canvas
2560   *
2561   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2562   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2563   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2564   * @syscap SystemCapability.ArkUI.ArkUI.Full
2565   * @crossplatform
2566   * @form
2567   * @since 10
2568   */
2569  /**
2570   * Draw an image on a canvas
2571   *
2572   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2573   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2574   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2575   * @syscap SystemCapability.ArkUI.ArkUI.Full
2576   * @crossplatform
2577   * @form
2578   * @atomicservice
2579   * @since 11
2580   */
2581  drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number): void;
2582
2583  /**
2584   * Draw an image on a canvas
2585   *
2586   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2587   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2588   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2589   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2590   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2591   * @syscap SystemCapability.ArkUI.ArkUI.Full
2592   * @since 8
2593   */
2594  /**
2595   * Draw an image on a canvas
2596   *
2597   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2598   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2599   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2600   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2601   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2602   * @syscap SystemCapability.ArkUI.ArkUI.Full
2603   * @form
2604   * @since 9
2605   */
2606  /**
2607   * Draw an image on a canvas
2608   *
2609   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2610   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2611   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2612   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2613   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2614   * @syscap SystemCapability.ArkUI.ArkUI.Full
2615   * @crossplatform
2616   * @form
2617   * @since 10
2618   */
2619  /**
2620   * Draw an image on a canvas
2621   *
2622   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2623   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2624   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2625   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2626   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2627   * @syscap SystemCapability.ArkUI.ArkUI.Full
2628   * @crossplatform
2629   * @form
2630   * @atomicservice
2631   * @since 11
2632   */
2633  drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number, dw: number, dh: number): void;
2634
2635  /**
2636   *Draw an image on a canvas
2637   *
2638   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2639   * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2640   * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2641   * @param { number } sw - Width of the rectangle (cropping) selection box of the image.
2642   * @param { number } sh - Height of the rectangle (cropping) selection box of the image.
2643   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2644   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2645   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2646   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2647   * @syscap SystemCapability.ArkUI.ArkUI.Full
2648   * @since 8
2649   */
2650  /**
2651   *Draw an image on a canvas
2652   *
2653   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2654   * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2655   * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2656   * @param { number } sw - Width of the rectangle (cropping) selection box of the image.
2657   * @param { number } sh - Height of the rectangle (cropping) selection box of the image.
2658   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2659   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2660   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2661   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2662   * @syscap SystemCapability.ArkUI.ArkUI.Full
2663   * @form
2664   * @since 9
2665   */
2666  /**
2667   *Draw an image on a canvas
2668   *
2669   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2670   * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2671   * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2672   * @param { number } sw - Width of the rectangle (cropping) selection box of the image.
2673   * @param { number } sh - Height of the rectangle (cropping) selection box of the image.
2674   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2675   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2676   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2677   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2678   * @syscap SystemCapability.ArkUI.ArkUI.Full
2679   * @crossplatform
2680   * @form
2681   * @since 10
2682   */
2683  /**
2684   *Draw an image on a canvas
2685   *
2686   * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas.
2687   * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2688   * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image.
2689   * @param { number } sw - Width of the rectangle (cropping) selection box of the image.
2690   * @param { number } sh - Height of the rectangle (cropping) selection box of the image.
2691   * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas.
2692   * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas.
2693   * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled.
2694   * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled.
2695   * @syscap SystemCapability.ArkUI.ArkUI.Full
2696   * @crossplatform
2697   * @form
2698   * @atomicservice
2699   * @since 11
2700   */
2701  drawImage(
2702    image: ImageBitmap | PixelMap,
2703    sx: number,
2704    sy: number,
2705    sw: number,
2706    sh: number,
2707    dx: number,
2708    dy: number,
2709    dw: number,
2710    dh: number,
2711  ): void;
2712
2713  /**
2714   * Clear the sub-path list and start a new path.
2715   *
2716   * @syscap SystemCapability.ArkUI.ArkUI.Full
2717   * @since 8
2718   */
2719  /**
2720   * Clear the sub-path list and start a new path.
2721   *
2722   * @syscap SystemCapability.ArkUI.ArkUI.Full
2723   * @form
2724   * @since 9
2725   */
2726  /**
2727   * Clear the sub-path list and start a new path.
2728   *
2729   * @syscap SystemCapability.ArkUI.ArkUI.Full
2730   * @crossplatform
2731   * @form
2732   * @since 10
2733   */
2734  /**
2735   * Clear the sub-path list and start a new path.
2736   *
2737   * @syscap SystemCapability.ArkUI.ArkUI.Full
2738   * @crossplatform
2739   * @form
2740   * @atomicservice
2741   * @since 11
2742   */
2743  beginPath(): void;
2744
2745  /**
2746   * Sets the currently created path as the current clipping path
2747   *
2748   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2749   * @syscap SystemCapability.ArkUI.ArkUI.Full
2750   * @since 8
2751   */
2752  /**
2753   * Sets the currently created path as the current clipping path
2754   *
2755   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2756   * @syscap SystemCapability.ArkUI.ArkUI.Full
2757   * @form
2758   * @since 9
2759   */
2760  /**
2761   * Sets the currently created path as the current clipping path
2762   *
2763   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2764   * @syscap SystemCapability.ArkUI.ArkUI.Full
2765   * @crossplatform
2766   * @form
2767   * @since 10
2768   */
2769  /**
2770   * Sets the currently created path as the current clipping path
2771   *
2772   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2773   * @syscap SystemCapability.ArkUI.ArkUI.Full
2774   * @crossplatform
2775   * @form
2776   * @atomicservice
2777   * @since 11
2778   */
2779  clip(fillRule?: CanvasFillRule): void;
2780
2781  /**
2782   * Tailoring according to the specified path
2783   *
2784   * @param { Path2D } path - Path to be cut.
2785   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2786   * @syscap SystemCapability.ArkUI.ArkUI.Full
2787   * @since 8
2788   */
2789  /**
2790   * Tailoring according to the specified path
2791   *
2792   * @param { Path2D } path - Path to be cut.
2793   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2794   * @syscap SystemCapability.ArkUI.ArkUI.Full
2795   * @form
2796   * @since 9
2797   */
2798  /**
2799   * Tailoring according to the specified path
2800   *
2801   * @param { Path2D } path - Path to be cut.
2802   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2803   * @syscap SystemCapability.ArkUI.ArkUI.Full
2804   * @crossplatform
2805   * @form
2806   * @since 10
2807   */
2808  /**
2809   * Tailoring according to the specified path
2810   *
2811   * @param { Path2D } path - Path to be cut.
2812   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2813   * @syscap SystemCapability.ArkUI.ArkUI.Full
2814   * @crossplatform
2815   * @form
2816   * @atomicservice
2817   * @since 11
2818   */
2819  clip(path: Path2D, fillRule?: CanvasFillRule): void;
2820
2821  /**
2822   * Fills existing paths according to the current fill style.
2823   *
2824   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2825   * @syscap SystemCapability.ArkUI.ArkUI.Full
2826   * @since 8
2827   */
2828  /**
2829   * Fills existing paths according to the current fill style.
2830   *
2831   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2832   * @syscap SystemCapability.ArkUI.ArkUI.Full
2833   * @form
2834   * @since 9
2835   */
2836  /**
2837   * Fills existing paths according to the current fill style.
2838   *
2839   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2840   * @syscap SystemCapability.ArkUI.ArkUI.Full
2841   * @crossplatform
2842   * @form
2843   * @since 10
2844   */
2845  /**
2846   * Fills existing paths according to the current fill style.
2847   *
2848   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2849   * @syscap SystemCapability.ArkUI.ArkUI.Full
2850   * @crossplatform
2851   * @form
2852   * @atomicservice
2853   * @since 11
2854   */
2855  fill(fillRule?: CanvasFillRule): void;
2856
2857  /**
2858   * Fills the specified path according to the current fill style
2859   *
2860   * @param { Path2D } path - Path to be filled.
2861   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2862   * @syscap SystemCapability.ArkUI.ArkUI.Full
2863   * @since 8
2864   */
2865  /**
2866   * Fills the specified path according to the current fill style
2867   *
2868   * @param { Path2D } path - Path to be filled.
2869   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2870   * @syscap SystemCapability.ArkUI.ArkUI.Full
2871   * @form
2872   * @since 9
2873   */
2874  /**
2875   * Fills the specified path according to the current fill style
2876   *
2877   * @param { Path2D } path - Path to be filled.
2878   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2879   * @syscap SystemCapability.ArkUI.ArkUI.Full
2880   * @crossplatform
2881   * @form
2882   * @since 10
2883   */
2884  /**
2885   * Fills the specified path according to the current fill style
2886   *
2887   * @param { Path2D } path - Path to be filled.
2888   * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}.
2889   * @syscap SystemCapability.ArkUI.ArkUI.Full
2890   * @crossplatform
2891   * @form
2892   * @atomicservice
2893   * @since 11
2894   */
2895  fill(path: Path2D, fillRule?: CanvasFillRule): void;
2896
2897  /**
2898   * Draws an existing path according to the current stroke style.
2899   *
2900   * @syscap SystemCapability.ArkUI.ArkUI.Full
2901   * @since 8
2902   */
2903  /**
2904   * Draws an existing path according to the current stroke style.
2905   *
2906   * @syscap SystemCapability.ArkUI.ArkUI.Full
2907   * @form
2908   * @since 9
2909   */
2910  /**
2911   * Draws an existing path according to the current stroke style.
2912   *
2913   * @syscap SystemCapability.ArkUI.ArkUI.Full
2914   * @crossplatform
2915   * @form
2916   * @since 10
2917   */
2918  /**
2919   * Draws an existing path according to the current stroke style.
2920   *
2921   * @syscap SystemCapability.ArkUI.ArkUI.Full
2922   * @crossplatform
2923   * @form
2924   * @atomicservice
2925   * @since 11
2926   */
2927  stroke(): void;
2928
2929  /**
2930   * Draws the specified path according to the current stroke style
2931   *
2932   * @param { Path2D } path - Specified stroke path object
2933   * @syscap SystemCapability.ArkUI.ArkUI.Full
2934   * @since 8
2935   */
2936  /**
2937   * Draws the specified path according to the current stroke style
2938   *
2939   * @param { Path2D } path - Specified stroke path object
2940   * @syscap SystemCapability.ArkUI.ArkUI.Full
2941   * @form
2942   * @since 9
2943   */
2944  /**
2945   * Draws the specified path according to the current stroke style
2946   *
2947   * @param { Path2D } path - Specified stroke path object
2948   * @syscap SystemCapability.ArkUI.ArkUI.Full
2949   * @crossplatform
2950   * @form
2951   * @since 10
2952   */
2953  /**
2954   * Draws the specified path according to the current stroke style
2955   *
2956   * @param { Path2D } path - Specified stroke path object
2957   * @syscap SystemCapability.ArkUI.ArkUI.Full
2958   * @crossplatform
2959   * @form
2960   * @atomicservice
2961   * @since 11
2962   */
2963  stroke(path: Path2D): void;
2964
2965  /**
2966   * Attributes that describe the fill color and style. The options are as follows:
2967   * color: Color String
2968   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
2969   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
2970   *
2971   * @type { string | CanvasGradient | CanvasPattern }
2972   * @default #000000 (black)
2973   * @syscap SystemCapability.ArkUI.ArkUI.Full
2974   * @since 8
2975   */
2976  /**
2977   * Attributes that describe the fill color and style. The options are as follows:
2978   * color: Color String
2979   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
2980   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
2981   *
2982   * @type { string | CanvasGradient | CanvasPattern }
2983   * @default #000000 (black)
2984   * @syscap SystemCapability.ArkUI.ArkUI.Full
2985   * @form
2986   * @since 9
2987   */
2988  /**
2989   * Attributes that describe the fill color and style. The options are as follows:
2990   *
2991   * @type { string | number | CanvasGradient | CanvasPattern }
2992   * string: Color String.
2993   * number: Indicates the color with number.
2994   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
2995   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
2996   * @default #000000 (black)
2997   * @syscap SystemCapability.ArkUI.ArkUI.Full
2998   * @crossplatform
2999   * @form
3000   * @since 10
3001   */
3002  /**
3003   * Attributes that describe the fill color and style. The options are as follows:
3004   *
3005   * @type { string | number | CanvasGradient | CanvasPattern }
3006   * string: Color String.
3007   * number: Indicates the color with number.
3008   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
3009   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
3010   * @default #000000 (black)
3011   * @syscap SystemCapability.ArkUI.ArkUI.Full
3012   * @crossplatform
3013   * @form
3014   * @atomicservice
3015   * @since 11
3016   */
3017  fillStyle: string | number | CanvasGradient | CanvasPattern;
3018
3019  /**
3020   * Attributes of the stroke color and style. The options are as follows:
3021   * color: Color String
3022   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
3023   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
3024   *
3025   * @type { string | CanvasGradient | CanvasPattern }
3026   * @default #000000 (black)
3027   * @syscap SystemCapability.ArkUI.ArkUI.Full
3028   * @since 8
3029   */
3030  /**
3031   * Attributes of the stroke color and style. The options are as follows:
3032   * color: Color String
3033   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
3034   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
3035   *
3036   * @type { string | CanvasGradient | CanvasPattern }
3037   * @default #000000 (black)
3038   * @syscap SystemCapability.ArkUI.ArkUI.Full
3039   * @form
3040   * @since 9
3041   */
3042  /**
3043   * Attributes of the stroke color and style. The options are as follows:
3044   *
3045   * @type { string | number | CanvasGradient | CanvasPattern }
3046   * string: Color String.
3047   * number: Indicates the color with number.
3048   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
3049   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
3050   * @default #000000 (black)
3051   * @syscap SystemCapability.ArkUI.ArkUI.Full
3052   * @crossplatform
3053   * @form
3054   * @since 10
3055   */
3056  /**
3057   * Attributes of the stroke color and style. The options are as follows:
3058   *
3059   * @type { string | number | CanvasGradient | CanvasPattern }
3060   * string: Color String.
3061   * number: Indicates the color with number.
3062   * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}.
3063   * CanvasPattern: Template object. For details, see {@link CanvasPattern}.
3064   * @default #000000 (black)
3065   * @syscap SystemCapability.ArkUI.ArkUI.Full
3066   * @crossplatform
3067   * @form
3068   * @atomicservice
3069   * @since 11
3070   */
3071  strokeStyle: string | number | CanvasGradient | CanvasPattern;
3072
3073  /**
3074   * Creates a linear gradient object that is specified along the parameter coordinates
3075   *
3076   * @param { number } x0 - The x-axis coordinate of the start point.
3077   * @param { number } y0 - The y-axis coordinate of the start point.
3078   * @param { number } x1 - x-axis coordinate of the end point.
3079   * @param { number } y1 - y-axis coordinate of the end point.
3080   * @returns { CanvasGradient }
3081   * @syscap SystemCapability.ArkUI.ArkUI.Full
3082   * @since 8
3083   */
3084  /**
3085   * Creates a linear gradient object that is specified along the parameter coordinates
3086   *
3087   * @param { number } x0 - The x-axis coordinate of the start point.
3088   * @param { number } y0 - The y-axis coordinate of the start point.
3089   * @param { number } x1 - x-axis coordinate of the end point.
3090   * @param { number } y1 - y-axis coordinate of the end point.
3091   * @returns { CanvasGradient }
3092   * @syscap SystemCapability.ArkUI.ArkUI.Full
3093   * @form
3094   * @since 9
3095   */
3096  /**
3097   * Creates a linear gradient object that is specified along the parameter coordinates
3098   *
3099   * @param { number } x0 - The x-axis coordinate of the start point.
3100   * @param { number } y0 - The y-axis coordinate of the start point.
3101   * @param { number } x1 - x-axis coordinate of the end point.
3102   * @param { number } y1 - y-axis coordinate of the end point.
3103   * @returns { CanvasGradient }
3104   * @syscap SystemCapability.ArkUI.ArkUI.Full
3105   * @crossplatform
3106   * @form
3107   * @since 10
3108   */
3109  /**
3110   * Creates a linear gradient object that is specified along the parameter coordinates
3111   *
3112   * @param { number } x0 - The x-axis coordinate of the start point.
3113   * @param { number } y0 - The y-axis coordinate of the start point.
3114   * @param { number } x1 - x-axis coordinate of the end point.
3115   * @param { number } y1 - y-axis coordinate of the end point.
3116   * @returns { CanvasGradient }
3117   * @syscap SystemCapability.ArkUI.ArkUI.Full
3118   * @crossplatform
3119   * @form
3120   * @atomicservice
3121   * @since 11
3122   */
3123  createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
3124
3125  /**
3126   * Creates a template object using the specified image
3127   *
3128   * @param { ImageBitmap } image - Objects as duplicate image sources
3129   * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported:
3130   * "repeat": Repeated images in both X and Y directions
3131   * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction
3132   * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction.
3133   * "no-repeat": Non-repeating images in both X and Y directions
3134   * @returns { CanvasPattern | null }
3135   * @syscap SystemCapability.ArkUI.ArkUI.Full
3136   * @since 8
3137   */
3138  /**
3139   * Creates a template object using the specified image
3140   *
3141   * @param { ImageBitmap } image - Objects as duplicate image sources
3142   * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported:
3143   * "repeat": Repeated images in both X and Y directions
3144   * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction
3145   * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction.
3146   * "no-repeat": Non-repeating images in both X and Y directions
3147   * @returns { CanvasPattern | null }
3148   * @syscap SystemCapability.ArkUI.ArkUI.Full
3149   * @form
3150   * @since 9
3151   */
3152  /**
3153   * Creates a template object using the specified image
3154   *
3155   * @param { ImageBitmap } image - Objects as duplicate image sources
3156   * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported:
3157   * "repeat": Repeated images in both X and Y directions
3158   * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction
3159   * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction.
3160   * "no-repeat": Non-repeating images in both X and Y directions
3161   * "clamp": Replicate the edge color if the shader draws outside of its original bounds.
3162   * "mirror": Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam.
3163   * @returns { CanvasPattern | null }
3164   * @syscap SystemCapability.ArkUI.ArkUI.Full
3165   * @crossplatform
3166   * @form
3167   * @since 10
3168   */
3169  /**
3170   * Creates a template object using the specified image
3171   *
3172   * @param { ImageBitmap } image - Objects as duplicate image sources
3173   * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported:
3174   * "repeat": Repeated images in both X and Y directions
3175   * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction
3176   * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction.
3177   * "no-repeat": Non-repeating images in both X and Y directions
3178   * "clamp": Replicate the edge color if the shader draws outside of its original bounds.
3179   * "mirror": Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam.
3180   * @returns { CanvasPattern | null }
3181   * @syscap SystemCapability.ArkUI.ArkUI.Full
3182   * @crossplatform
3183   * @form
3184   * @atomicservice
3185   * @since 11
3186   */
3187  createPattern(image: ImageBitmap, repetition: string | null): CanvasPattern | null;
3188
3189  /**
3190   * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles
3191   *
3192   * @param { number } x0 - The x-axis coordinate of the start circle.
3193   * @param { number } y0 - The y-axis coordinate of the start circle.
3194   * @param { number } r0 - Radius of the starting circle.
3195   * @param { number } x1 - The x-axis coordinate of the end circle.
3196   * @param { number } y1 - The y-axis coordinate of the end circle.
3197   * @param { number } r1 - Radius of the end circle.
3198   * @returns { CanvasGradient }
3199   * @syscap SystemCapability.ArkUI.ArkUI.Full
3200   * @since 8
3201   */
3202  /**
3203   * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles
3204   *
3205   * @param { number } x0 - The x-axis coordinate of the start circle.
3206   * @param { number } y0 - The y-axis coordinate of the start circle.
3207   * @param { number } r0 - Radius of the starting circle.
3208   * @param { number } x1 - The x-axis coordinate of the end circle.
3209   * @param { number } y1 - The y-axis coordinate of the end circle.
3210   * @param { number } r1 - Radius of the end circle.
3211   * @returns { CanvasGradient }
3212   * @syscap SystemCapability.ArkUI.ArkUI.Full
3213   * @form
3214   * @since 9
3215   */
3216  /**
3217   * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles
3218   *
3219   * @param { number } x0 - The x-axis coordinate of the start circle.
3220   * @param { number } y0 - The y-axis coordinate of the start circle.
3221   * @param { number } r0 - Radius of the starting circle.
3222   * @param { number } x1 - The x-axis coordinate of the end circle.
3223   * @param { number } y1 - The y-axis coordinate of the end circle.
3224   * @param { number } r1 - Radius of the end circle.
3225   * @returns { CanvasGradient }
3226   * @syscap SystemCapability.ArkUI.ArkUI.Full
3227   * @crossplatform
3228   * @form
3229   * @since 10
3230   */
3231  /**
3232   * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles
3233   *
3234   * @param { number } x0 - The x-axis coordinate of the start circle.
3235   * @param { number } y0 - The y-axis coordinate of the start circle.
3236   * @param { number } r0 - Radius of the starting circle.
3237   * @param { number } x1 - The x-axis coordinate of the end circle.
3238   * @param { number } y1 - The y-axis coordinate of the end circle.
3239   * @param { number } r1 - Radius of the end circle.
3240   * @returns { CanvasGradient }
3241   * @syscap SystemCapability.ArkUI.ArkUI.Full
3242   * @crossplatform
3243   * @form
3244   * @atomicservice
3245   * @since 11
3246   */
3247  createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
3248
3249  /**
3250   * Creates a gradient around a point with given coordinates.
3251   *
3252   * @param { number } startAngle - The angle at which to begin the gradient, in radians.
3253   *                   Angle measurements start horizontally the right of the center and move around clockwise.
3254   * @param { number } x - The x-axis coordinate of the center of the gradient.
3255   * @param { number } y - The y-axis coordinate of the center of the gradient.
3256   * @returns { CanvasGradient } A CanvasGradient object that draws a conic gradient around the given coordinates.
3257   * @syscap SystemCapability.ArkUI.ArkUI.Full
3258   * @crossplatform
3259   * @since 10
3260   */
3261  /**
3262   * Creates a gradient around a point with given coordinates.
3263   *
3264   * @param { number } startAngle - The angle at which to begin the gradient, in radians.
3265   *                   Angle measurements start horizontally the right of the center and move around clockwise.
3266   * @param { number } x - The x-axis coordinate of the center of the gradient.
3267   * @param { number } y - The y-axis coordinate of the center of the gradient.
3268   * @returns { CanvasGradient } A CanvasGradient object that draws a conic gradient around the given coordinates.
3269   * @syscap SystemCapability.ArkUI.ArkUI.Full
3270   * @crossplatform
3271   * @atomicservice
3272   * @since 11
3273   */
3274  createConicGradient(
3275    startAngle: number,
3276    x: number,
3277    y: number
3278  ): CanvasGradient;
3279
3280  /**
3281   * Provides filter effects such as blur and grayscale. You can set the following filter effects:
3282   * blur(<length>): Adds a Gaussian blur effect to the drawing
3283   * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level.
3284   * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black.
3285   *    When the value is 100%, there is no change in the image.
3286   * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray.
3287   *    When the value is 0%, there is no change in the image.
3288   * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image.
3289   * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%,
3290   *    the image is completely inverted. When the value is 0%, there is no change in the image.
3291   * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent.
3292   *    When the value is 100%, there is no change in the image.
3293   * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated.
3294   *    When the value is 100%, there is no change in the image.
3295   * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia.
3296   *    When the value is 0%, there is no change in the image.
3297   * none: Turn off filter effects
3298   *
3299   * @type { string }
3300   * @default none
3301   * @syscap SystemCapability.ArkUI.ArkUI.Full
3302   * @since 8
3303   */
3304  /**
3305   * Provides filter effects such as blur and grayscale. You can set the following filter effects:
3306   * blur(<length>): Adds a Gaussian blur effect to the drawing
3307   * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level.
3308   * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black.
3309   *    When the value is 100%, there is no change in the image.
3310   * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray.
3311   *    When the value is 0%, there is no change in the image.
3312   * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image.
3313   * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%,
3314   *    the image is completely inverted. When the value is 0%, there is no change in the image.
3315   * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent.
3316   *    When the value is 100%, there is no change in the image.
3317   * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated.
3318   *    When the value is 100%, there is no change in the image.
3319   * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia.
3320   *    When the value is 0%, there is no change in the image.
3321   * none: Turn off filter effects
3322   *
3323   * @type { string }
3324   * @default none
3325   * @syscap SystemCapability.ArkUI.ArkUI.Full
3326   * @form
3327   * @since 9
3328   */
3329  /**
3330   * Provides filter effects such as blur and grayscale. You can set the following filter effects:
3331   * blur(<length>): Adds a Gaussian blur effect to the drawing
3332   * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level.
3333   * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black.
3334   *    When the value is 100%, there is no change in the image.
3335   * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray.
3336   *    When the value is 0%, there is no change in the image.
3337   * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image.
3338   * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%,
3339   *    the image is completely inverted. When the value is 0%, there is no change in the image.
3340   * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent.
3341   *    When the value is 100%, there is no change in the image.
3342   * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated.
3343   *    When the value is 100%, there is no change in the image.
3344   * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia.
3345   *    When the value is 0%, there is no change in the image.
3346   * none: Turn off filter effects
3347   *
3348   * @type { string }
3349   * @default none
3350   * @syscap SystemCapability.ArkUI.ArkUI.Full
3351   * @crossplatform
3352   * @form
3353   * @since 10
3354   */
3355  /**
3356   * Provides filter effects such as blur and grayscale. You can set the following filter effects:
3357   * blur(<length>): Adds a Gaussian blur effect to the drawing
3358   * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level.
3359   * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black.
3360   *    When the value is 100%, there is no change in the image.
3361   * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray.
3362   *    When the value is 0%, there is no change in the image.
3363   * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image.
3364   * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%,
3365   *    the image is completely inverted. When the value is 0%, there is no change in the image.
3366   * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent.
3367   *    When the value is 100%, there is no change in the image.
3368   * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated.
3369   *    When the value is 100%, there is no change in the image.
3370   * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia.
3371   *    When the value is 0%, there is no change in the image.
3372   * none: Turn off filter effects
3373   *
3374   * @type { string }
3375   * @default none
3376   * @syscap SystemCapability.ArkUI.ArkUI.Full
3377   * @crossplatform
3378   * @form
3379   * @atomicservice
3380   * @since 11
3381   */
3382  filter: string;
3383
3384  /**
3385   * Creates a new, empty ImageData object of the specified size
3386   *
3387   * @param { number } sw - Width of the ImageData object.
3388   * @param { number } sh - Height of the ImageData object.
3389   * @returns { ImageData }
3390   * @syscap SystemCapability.ArkUI.ArkUI.Full
3391   * @since 8
3392   */
3393  /**
3394   * Creates a new, empty ImageData object of the specified size
3395   *
3396   * @param { number } sw - Width of the ImageData object.
3397   * @param { number } sh - Height of the ImageData object.
3398   * @returns { ImageData }
3399   * @syscap SystemCapability.ArkUI.ArkUI.Full
3400   * @form
3401   * @since 9
3402   */
3403  /**
3404   * Creates a new, empty ImageData object of the specified size
3405   *
3406   * @param { number } sw - Width of the ImageData object.
3407   * @param { number } sh - Height of the ImageData object.
3408   * @returns { ImageData }
3409   * @syscap SystemCapability.ArkUI.ArkUI.Full
3410   * @crossplatform
3411   * @form
3412   * @since 10
3413   */
3414  /**
3415   * Creates a new, empty ImageData object of the specified size
3416   *
3417   * @param { number } sw - Width of the ImageData object.
3418   * @param { number } sh - Height of the ImageData object.
3419   * @returns { ImageData }
3420   * @syscap SystemCapability.ArkUI.ArkUI.Full
3421   * @crossplatform
3422   * @form
3423   * @atomicservice
3424   * @since 11
3425   */
3426  createImageData(sw: number, sh: number): ImageData;
3427
3428  /**
3429   * From an existing ImageData object, copy an object with the same width and height as the image.
3430   *    The image content is not copied.
3431   *
3432   * @param { ImageData } imagedata - ImageData object to be copied.
3433   * @returns { ImageData }
3434   * @syscap SystemCapability.ArkUI.ArkUI.Full
3435   * @since 8
3436   */
3437  /**
3438   * From an existing ImageData object, copy an object with the same width and height as the image.
3439   *    The image content is not copied.
3440   *
3441   * @param { ImageData } imagedata - ImageData object to be copied.
3442   * @returns { ImageData }
3443   * @syscap SystemCapability.ArkUI.ArkUI.Full
3444   * @form
3445   * @since 9
3446   */
3447  /**
3448   * From an existing ImageData object, copy an object with the same width and height as the image.
3449   *    The image content is not copied.
3450   *
3451   * @param { ImageData } imagedata - ImageData object to be copied.
3452   * @returns { ImageData }
3453   * @syscap SystemCapability.ArkUI.ArkUI.Full
3454   * @crossplatform
3455   * @form
3456   * @since 10
3457   */
3458  /**
3459   * From an existing ImageData object, copy an object with the same width and height as the image.
3460   *    The image content is not copied.
3461   *
3462   * @param { ImageData } imagedata - ImageData object to be copied.
3463   * @returns { ImageData }
3464   * @syscap SystemCapability.ArkUI.ArkUI.Full
3465   * @crossplatform
3466   * @form
3467   * @atomicservice
3468   * @since 11
3469   */
3470  createImageData(imagedata: ImageData): ImageData;
3471
3472  /**
3473   * Obtains the pixel data of a specified area on the current canvas.
3474   *
3475   * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3476   * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3477   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3478   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3479   * @returns { ImageData }
3480   * @syscap SystemCapability.ArkUI.ArkUI.Full
3481   * @since 8
3482   */
3483  /**
3484   * Obtains the pixel data of a specified area on the current canvas.
3485   *
3486   * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3487   * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3488   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3489   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3490   * @returns { ImageData }
3491   * @syscap SystemCapability.ArkUI.ArkUI.Full
3492   * @form
3493   * @since 9
3494   */
3495  /**
3496   * Obtains the pixel data of a specified area on the current canvas.
3497   *
3498   * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3499   * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3500   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3501   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3502   * @returns { ImageData }
3503   * @syscap SystemCapability.ArkUI.ArkUI.Full
3504   * @crossplatform
3505   * @form
3506   * @since 10
3507   */
3508  /**
3509   * Obtains the pixel data of a specified area on the current canvas.
3510   *
3511   * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3512   * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted.
3513   * @param { number } sw - The width of the rectangular area of the image data to be extracted.
3514   * @param { number } sh - The height of the rectangular area of the image data to be extracted.
3515   * @returns { ImageData }
3516   * @syscap SystemCapability.ArkUI.ArkUI.Full
3517   * @crossplatform
3518   * @form
3519   * @atomicservice
3520   * @since 11
3521   */
3522  getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
3523
3524  /**
3525   * Obtains the PixelMap of a specified area on the current canvas.
3526   *
3527   * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted.
3528   * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted.
3529   * @param { number } sw - The width of the rectangular area of the PixelMap to be extracted.
3530   * @param { number } sh - The height of the rectangular area of the PixelMap to be extracted.
3531   * @returns { PixelMap }
3532   * @syscap SystemCapability.ArkUI.ArkUI.Full
3533   * @since 8
3534   */
3535  /**
3536   * Obtains the PixelMap of a specified area on the current canvas.
3537   *
3538   * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted.
3539   * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted.
3540   * @param { number } sw - The width of the rectangular area of the PixelMap to be extracted.
3541   * @param { number } sh - The height of the rectangular area of the PixelMap to be extracted.
3542   * @returns { PixelMap }
3543   * @syscap SystemCapability.ArkUI.ArkUI.Full
3544   * @crossplatform
3545   * @since 10
3546   */
3547  /**
3548   * Obtains the PixelMap of a specified area on the current canvas.
3549   *
3550   * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted.
3551   * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted.
3552   * @param { number } sw - The width of the rectangular area of the PixelMap to be extracted.
3553   * @param { number } sh - The height of the rectangular area of the PixelMap to be extracted.
3554   * @returns { PixelMap }
3555   * @syscap SystemCapability.ArkUI.ArkUI.Full
3556   * @crossplatform
3557   * @atomicservice
3558   * @since 11
3559   */
3560  getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap;
3561
3562  /**
3563   * Draws the specified ImageData object onto the canvas
3564   *
3565   * @param { ImageData } imagedata - ImageData object to be drawn.
3566   * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3567   * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3568   * @syscap SystemCapability.ArkUI.ArkUI.Full
3569   * @since 8
3570   */
3571  /**
3572   * Draws the specified ImageData object onto the canvas
3573   *
3574   * @param { ImageData } imagedata - ImageData object to be drawn.
3575   * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3576   * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3577   * @syscap SystemCapability.ArkUI.ArkUI.Full
3578   * @form
3579   * @since 9
3580   */
3581  /**
3582   * Draws the specified ImageData object onto the canvas
3583   *
3584   * @param { ImageData } imagedata - ImageData object to be drawn.
3585   * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3586   * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3587   * @syscap SystemCapability.ArkUI.ArkUI.Full
3588   * @crossplatform
3589   * @form
3590   * @since 10
3591   */
3592  /**
3593   * Draws the specified ImageData object onto the canvas
3594   *
3595   * @param { ImageData } imagedata - ImageData object to be drawn.
3596   * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3597   * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3598   * @syscap SystemCapability.ArkUI.ArkUI.Full
3599   * @crossplatform
3600   * @form
3601   * @atomicservice
3602   * @since 11
3603   */
3604  putImageData(imagedata: ImageData, dx: number | string, dy: number | string): void;
3605
3606  /**
3607   * Draws the specified ImageData object onto the canvas
3608   *
3609   * @param { ImageData } imagedata - ImageData object to be drawn.
3610   * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3611   * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3612   * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data.
3613   *    The default is the upper left corner (x coordinate) of the entire image data.
3614   * @param { number } dirtyY - Position of the upper left corner of the rectangular area in the source image data.
3615   *    The default is the upper left corner (y coordinate) of the entire image data.
3616   * @param { number } dirtyWidth - Width of the rectangular area in the source image data.
3617   *    The default is the width of the image data.
3618   * @param { number } dirtyHeight - Height of the rectangular area in the source image data.
3619   *    The default is the height of the image data.
3620   * @syscap SystemCapability.ArkUI.ArkUI.Full
3621   * @since 8
3622   */
3623  /**
3624   * Draws the specified ImageData object onto the canvas
3625   *
3626   * @param { ImageData } imagedata - ImageData object to be drawn.
3627   * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3628   * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3629   * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data.
3630   *    The default is the upper left corner (x coordinate) of the entire image data.
3631   * @param { number } dirtyY - Position of the upper left corner of the rectangular area in the source image data.
3632   *    The default is the upper left corner (y coordinate) of the entire image data.
3633   * @param { number } dirtyWidth - Width of the rectangular area in the source image data.
3634   *    The default is the width of the image data.
3635   * @param { number } dirtyHeight - Height of the rectangular area in the source image data.
3636   *    The default is the height of the image data.
3637   * @syscap SystemCapability.ArkUI.ArkUI.Full
3638   * @form
3639   * @since 9
3640   */
3641  /**
3642   * Draws the specified ImageData object onto the canvas
3643   *
3644   * @param { ImageData } imagedata - ImageData object to be drawn.
3645   * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3646   * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3647   * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data.
3648   *    The default is the upper left corner (x coordinate) of the entire image data.
3649   * @param { number | string } dirtyY - Position of the upper left corner of the rectangular area in the source image data.
3650   *    The default is the upper left corner (y coordinate) of the entire image data.
3651   * @param { number | string } dirtyWidth - Width of the rectangular area in the source image data.
3652   *    The default is the width of the image data.
3653   * @param { number | string } dirtyHeight - Height of the rectangular area in the source image data.
3654   *    The default is the height of the image data.
3655   * @syscap SystemCapability.ArkUI.ArkUI.Full
3656   * @crossplatform
3657   * @form
3658   * @since 10
3659   */
3660  /**
3661   * Draws the specified ImageData object onto the canvas
3662   *
3663   * @param { ImageData } imagedata - ImageData object to be drawn.
3664   * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction).
3665   * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction).
3666   * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data.
3667   *    The default is the upper left corner (x coordinate) of the entire image data.
3668   * @param { number | string } dirtyY - Position of the upper left corner of the rectangular area in the source image data.
3669   *    The default is the upper left corner (y coordinate) of the entire image data.
3670   * @param { number | string } dirtyWidth - Width of the rectangular area in the source image data.
3671   *    The default is the width of the image data.
3672   * @param { number | string } dirtyHeight - Height of the rectangular area in the source image data.
3673   *    The default is the height of the image data.
3674   * @syscap SystemCapability.ArkUI.ArkUI.Full
3675   * @crossplatform
3676   * @form
3677   * @atomicservice
3678   * @since 11
3679   */
3680  putImageData(
3681    imagedata: ImageData,
3682    dx: number | string,
3683    dy: number | string,
3684    dirtyX: number | string,
3685    dirtyY: number | string,
3686    dirtyWidth: number | string,
3687    dirtyHeight: number | string
3688  ): void;
3689
3690  /**
3691   * Specifies whether to smooth the image. The value true indicates that the image is smooth.
3692   *    The value false indicates that the image is not smooth.
3693   *
3694   * @type { boolean }
3695   * @default true
3696   * @syscap SystemCapability.ArkUI.ArkUI.Full
3697   * @since 8
3698   */
3699  /**
3700   * Specifies whether to smooth the image. The value true indicates that the image is smooth.
3701   *    The value false indicates that the image is not smooth.
3702   *
3703   * @type { boolean }
3704   * @default true
3705   * @syscap SystemCapability.ArkUI.ArkUI.Full
3706   * @form
3707   * @since 9
3708   */
3709  /**
3710   * Specifies whether to smooth the image. The value true indicates that the image is smooth.
3711   *    The value false indicates that the image is not smooth.
3712   *
3713   * @type { boolean }
3714   * @default true
3715   * @syscap SystemCapability.ArkUI.ArkUI.Full
3716   * @crossplatform
3717   * @form
3718   * @since 10
3719   */
3720  /**
3721   * Specifies whether to smooth the image. The value true indicates that the image is smooth.
3722   *    The value false indicates that the image is not smooth.
3723   *
3724   * @type { boolean }
3725   * @default true
3726   * @syscap SystemCapability.ArkUI.ArkUI.Full
3727   * @crossplatform
3728   * @form
3729   * @atomicservice
3730   * @since 11
3731   */
3732  imageSmoothingEnabled: boolean;
3733
3734  /**
3735   * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}.
3736   *
3737   * @type { ImageSmoothingQuality }
3738   * @default low
3739   * @syscap SystemCapability.ArkUI.ArkUI.Full
3740   * @since 8
3741   */
3742  /**
3743   * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}.
3744   *
3745   * @type { ImageSmoothingQuality }
3746   * @default low
3747   * @syscap SystemCapability.ArkUI.ArkUI.Full
3748   * @form
3749   * @since 9
3750   */
3751  /**
3752   * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}.
3753   *
3754   * @type { ImageSmoothingQuality }
3755   * @default low
3756   * @syscap SystemCapability.ArkUI.ArkUI.Full
3757   * @crossplatform
3758   * @form
3759   * @since 10
3760   */
3761  /**
3762   * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}.
3763   *
3764   * @type { ImageSmoothingQuality }
3765   * @default low
3766   * @syscap SystemCapability.ArkUI.ArkUI.Full
3767   * @crossplatform
3768   * @form
3769   * @atomicservice
3770   * @since 11
3771   */
3772  imageSmoothingQuality: ImageSmoothingQuality;
3773
3774  /**
3775   * Line segment endpoint attribute. For details, see {@link CanvasLineCap}.
3776   *
3777   * @type { CanvasLineCap }
3778   * @default butt
3779   * @syscap SystemCapability.ArkUI.ArkUI.Full
3780   * @since 8
3781   */
3782  /**
3783   * Line segment endpoint attribute. For details, see {@link CanvasLineCap}.
3784   *
3785   * @type { CanvasLineCap }
3786   * @default butt
3787   * @syscap SystemCapability.ArkUI.ArkUI.Full
3788   * @form
3789   * @since 9
3790   */
3791  /**
3792   * Line segment endpoint attribute. For details, see {@link CanvasLineCap}.
3793   *
3794   * @type { CanvasLineCap }
3795   * @default butt
3796   * @syscap SystemCapability.ArkUI.ArkUI.Full
3797   * @crossplatform
3798   * @form
3799   * @since 10
3800   */
3801  /**
3802   * Line segment endpoint attribute. For details, see {@link CanvasLineCap}.
3803   *
3804   * @type { CanvasLineCap }
3805   * @default butt
3806   * @syscap SystemCapability.ArkUI.ArkUI.Full
3807   * @crossplatform
3808   * @form
3809   * @atomicservice
3810   * @since 11
3811   */
3812  lineCap: CanvasLineCap;
3813
3814  /**
3815   * Dotted line offset attribute.
3816   *
3817   * @type { number }
3818   * @default 0.0
3819   * @syscap SystemCapability.ArkUI.ArkUI.Full
3820   * @since 8
3821   */
3822  /**
3823   * Dotted line offset attribute.
3824   *
3825   * @type { number }
3826   * @default 0.0
3827   * @syscap SystemCapability.ArkUI.ArkUI.Full
3828   * @form
3829   * @since 9
3830   */
3831  /**
3832   * Dotted line offset attribute.
3833   *
3834   * @type { number }
3835   * @default 0.0
3836   * @syscap SystemCapability.ArkUI.ArkUI.Full
3837   * @crossplatform
3838   * @form
3839   * @since 10
3840   */
3841  /**
3842   * Dotted line offset attribute.
3843   *
3844   * @type { number }
3845   * @default 0.0
3846   * @syscap SystemCapability.ArkUI.ArkUI.Full
3847   * @crossplatform
3848   * @form
3849   * @atomicservice
3850   * @since 11
3851   */
3852  lineDashOffset: number;
3853
3854  /**
3855   * Line segment connection point attribute. For details, see {@link CanvasLineJoin}.
3856   *
3857   * @type { CanvasLineJoin }
3858   * @default miter
3859   * @syscap SystemCapability.ArkUI.ArkUI.Full
3860   * @since 8
3861   */
3862  /**
3863   * Line segment connection point attribute. For details, see {@link CanvasLineJoin}.
3864   *
3865   * @type { CanvasLineJoin }
3866   * @default miter
3867   * @syscap SystemCapability.ArkUI.ArkUI.Full
3868   * @form
3869   * @since 9
3870   */
3871  /**
3872   * Line segment connection point attribute. For details, see {@link CanvasLineJoin}.
3873   *
3874   * @type { CanvasLineJoin }
3875   * @default miter
3876   * @syscap SystemCapability.ArkUI.ArkUI.Full
3877   * @crossplatform
3878   * @form
3879   * @since 10
3880   */
3881  /**
3882   * Line segment connection point attribute. For details, see {@link CanvasLineJoin}.
3883   *
3884   * @type { CanvasLineJoin }
3885   * @default miter
3886   * @syscap SystemCapability.ArkUI.ArkUI.Full
3887   * @crossplatform
3888   * @form
3889   * @atomicservice
3890   * @since 11
3891   */
3892  lineJoin: CanvasLineJoin;
3893
3894  /**
3895   * Line thickness attribute. The value cannot be 0 or a negative number.
3896   *
3897   * @type { number }
3898   * @default 1(px)
3899   * @syscap SystemCapability.ArkUI.ArkUI.Full
3900   * @since 8
3901   */
3902  /**
3903   * Line thickness attribute. The value cannot be 0 or a negative number.
3904   *
3905   * @type { number }
3906   * @default 1(px)
3907   * @syscap SystemCapability.ArkUI.ArkUI.Full
3908   * @form
3909   * @since 9
3910   */
3911  /**
3912   * Line thickness attribute. The value cannot be 0 or a negative number.
3913   *
3914   * @type { number }
3915   * @default 1(px)
3916   * @syscap SystemCapability.ArkUI.ArkUI.Full
3917   * @crossplatform
3918   * @form
3919   * @since 10
3920   */
3921  /**
3922   * Line thickness attribute. The value cannot be 0 or a negative number.
3923   *
3924   * @type { number }
3925   * @default 1(px)
3926   * @syscap SystemCapability.ArkUI.ArkUI.Full
3927   * @crossplatform
3928   * @form
3929   * @atomicservice
3930   * @since 11
3931   */
3932  lineWidth: number;
3933
3934  /**
3935   * The value of this parameter cannot be 0 or a negative number.
3936   *
3937   * @type { number }
3938   * @default 10(px)
3939   * @syscap SystemCapability.ArkUI.ArkUI.Full
3940   * @since 8
3941   */
3942  /**
3943   * The value of this parameter cannot be 0 or a negative number.
3944   *
3945   * @type { number }
3946   * @default 10(px)
3947   * @syscap SystemCapability.ArkUI.ArkUI.Full
3948   * @form
3949   * @since 9
3950   */
3951  /**
3952   * The value of this parameter cannot be 0 or a negative number.
3953   *
3954   * @type { number }
3955   * @default 10(px)
3956   * @syscap SystemCapability.ArkUI.ArkUI.Full
3957   * @crossplatform
3958   * @form
3959   * @since 10
3960   */
3961  /**
3962   * The value of this parameter cannot be 0 or a negative number.
3963   *
3964   * @type { number }
3965   * @default 10(px)
3966   * @syscap SystemCapability.ArkUI.ArkUI.Full
3967   * @crossplatform
3968   * @form
3969   * @atomicservice
3970   * @since 11
3971   */
3972  miterLimit: number;
3973
3974  /**
3975   * Gets the current segment style.
3976   *
3977   * @returns { number[] }
3978   * @syscap SystemCapability.ArkUI.ArkUI.Full
3979   * @since 8
3980   */
3981  /**
3982   * Gets the current segment style.
3983   *
3984   * @returns { number[] }
3985   * @syscap SystemCapability.ArkUI.ArkUI.Full
3986   * @form
3987   * @since 9
3988   */
3989  /**
3990   * Gets the current segment style.
3991   *
3992   * @returns { number[] }
3993   * @syscap SystemCapability.ArkUI.ArkUI.Full
3994   * @crossplatform
3995   * @form
3996   * @since 10
3997   */
3998  /**
3999   * Gets the current segment style.
4000   *
4001   * @returns { number[] }
4002   * @syscap SystemCapability.ArkUI.ArkUI.Full
4003   * @crossplatform
4004   * @form
4005   * @atomicservice
4006   * @since 11
4007   */
4008  getLineDash(): number[];
4009
4010  /**
4011   * Sets the dashed line mode for line drawing.
4012   *
4013   * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and
4014   *    spacing (coordinate space units).
4015   * @syscap SystemCapability.ArkUI.ArkUI.Full
4016   * @since 8
4017   */
4018  /**
4019   * Sets the dashed line mode for line drawing.
4020   *
4021   * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and
4022   *    spacing (coordinate space units).
4023   * @syscap SystemCapability.ArkUI.ArkUI.Full
4024   * @form
4025   * @since 9
4026   */
4027  /**
4028   * Sets the dashed line mode for line drawing.
4029   *
4030   * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and
4031   *    spacing (coordinate space units).
4032   * @syscap SystemCapability.ArkUI.ArkUI.Full
4033   * @crossplatform
4034   * @form
4035   * @since 10
4036   */
4037  /**
4038   * Sets the dashed line mode for line drawing.
4039   *
4040   * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and
4041   *    spacing (coordinate space units).
4042   * @syscap SystemCapability.ArkUI.ArkUI.Full
4043   * @crossplatform
4044   * @form
4045   * @atomicservice
4046   * @since 11
4047   */
4048  setLineDash(segments: number[]): void;
4049
4050  /**
4051   * Clears the drawing content of a rectangular area.
4052   *
4053   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4054   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4055   * @param { number } w - Width of the rectangle.
4056   * @param { number } h - Height of the rectangle.
4057   * @syscap SystemCapability.ArkUI.ArkUI.Full
4058   * @since 8
4059   */
4060  /**
4061   * Clears the drawing content of a rectangular area.
4062   *
4063   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4064   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4065   * @param { number } w - Width of the rectangle.
4066   * @param { number } h - Height of the rectangle.
4067   * @syscap SystemCapability.ArkUI.ArkUI.Full
4068   * @form
4069   * @since 9
4070   */
4071  /**
4072   * Clears the drawing content of a rectangular area.
4073   *
4074   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4075   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4076   * @param { number } w - Width of the rectangle.
4077   * @param { number } h - Height of the rectangle.
4078   * @syscap SystemCapability.ArkUI.ArkUI.Full
4079   * @crossplatform
4080   * @form
4081   * @since 10
4082   */
4083  /**
4084   * Clears the drawing content of a rectangular area.
4085   *
4086   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4087   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4088   * @param { number } w - Width of the rectangle.
4089   * @param { number } h - Height of the rectangle.
4090   * @syscap SystemCapability.ArkUI.ArkUI.Full
4091   * @crossplatform
4092   * @form
4093   * @atomicservice
4094   * @since 11
4095   */
4096  clearRect(x: number, y: number, w: number, h: number): void;
4097
4098  /**
4099   * Fills a specified rectangular area
4100   *
4101   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4102   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4103   * @param { number } w - Width of the rectangle.
4104   * @param { number } h - Height of the rectangle.
4105   * @syscap SystemCapability.ArkUI.ArkUI.Full
4106   * @since 8
4107   */
4108  /**
4109   * Fills a specified rectangular area
4110   *
4111   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4112   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4113   * @param { number } w - Width of the rectangle.
4114   * @param { number } h - Height of the rectangle.
4115   * @syscap SystemCapability.ArkUI.ArkUI.Full
4116   * @form
4117   * @since 9
4118   */
4119  /**
4120   * Fills a specified rectangular area
4121   *
4122   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4123   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4124   * @param { number } w - Width of the rectangle.
4125   * @param { number } h - Height of the rectangle.
4126   * @syscap SystemCapability.ArkUI.ArkUI.Full
4127   * @crossplatform
4128   * @form
4129   * @since 10
4130   */
4131  /**
4132   * Fills a specified rectangular area
4133   *
4134   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4135   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4136   * @param { number } w - Width of the rectangle.
4137   * @param { number } h - Height of the rectangle.
4138   * @syscap SystemCapability.ArkUI.ArkUI.Full
4139   * @crossplatform
4140   * @form
4141   * @atomicservice
4142   * @since 11
4143   */
4144  fillRect(x: number, y: number, w: number, h: number): void;
4145
4146  /**
4147   * Stroke Specify Rectangular Area
4148   *
4149   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4150   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4151   * @param { number } w - Width of the rectangle.
4152   * @param { number } h - Height of the rectangle.
4153   * @syscap SystemCapability.ArkUI.ArkUI.Full
4154   * @since 8
4155   */
4156  /**
4157   * Stroke Specify Rectangular Area
4158   *
4159   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4160   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4161   * @param { number } w - Width of the rectangle.
4162   * @param { number } h - Height of the rectangle.
4163   * @syscap SystemCapability.ArkUI.ArkUI.Full
4164   * @form
4165   * @since 9
4166   */
4167  /**
4168   * Stroke Specify Rectangular Area
4169   *
4170   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4171   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4172   * @param { number } w - Width of the rectangle.
4173   * @param { number } h - Height of the rectangle.
4174   * @syscap SystemCapability.ArkUI.ArkUI.Full
4175   * @crossplatform
4176   * @form
4177   * @since 10
4178   */
4179  /**
4180   * Stroke Specify Rectangular Area
4181   *
4182   * @param { number } x - The x-axis coordinate of the start point of the rectangle.
4183   * @param { number } y - The y-axis coordinate of the start point of the rectangle.
4184   * @param { number } w - Width of the rectangle.
4185   * @param { number } h - Height of the rectangle.
4186   * @syscap SystemCapability.ArkUI.ArkUI.Full
4187   * @crossplatform
4188   * @form
4189   * @atomicservice
4190   * @since 11
4191   */
4192  strokeRect(x: number, y: number, w: number, h: number): void;
4193
4194  /**
4195   * Shadow blur radius. The value cannot be a negative number.
4196   *
4197   * @type { number }
4198   * @default 0
4199   * @syscap SystemCapability.ArkUI.ArkUI.Full
4200   * @since 8
4201   */
4202  /**
4203   * Shadow blur radius. The value cannot be a negative number.
4204   *
4205   * @type { number }
4206   * @default 0
4207   * @syscap SystemCapability.ArkUI.ArkUI.Full
4208   * @form
4209   * @since 9
4210   */
4211  /**
4212   * Shadow blur radius. The value cannot be a negative number.
4213   *
4214   * @type { number }
4215   * @default 0
4216   * @syscap SystemCapability.ArkUI.ArkUI.Full
4217   * @crossplatform
4218   * @form
4219   * @since 10
4220   */
4221  /**
4222   * Shadow blur radius. The value cannot be a negative number.
4223   *
4224   * @type { number }
4225   * @default 0
4226   * @syscap SystemCapability.ArkUI.ArkUI.Full
4227   * @crossplatform
4228   * @form
4229   * @atomicservice
4230   * @since 11
4231   */
4232  shadowBlur: number;
4233
4234  /**
4235   * Shadow color.
4236   *
4237   * @type { string }
4238   * @default transparent black
4239   * @syscap SystemCapability.ArkUI.ArkUI.Full
4240   * @since 8
4241   */
4242  /**
4243   * Shadow color.
4244   *
4245   * @type { string }
4246   * @default transparent black
4247   * @syscap SystemCapability.ArkUI.ArkUI.Full
4248   * @form
4249   * @since 9
4250   */
4251  /**
4252   * Shadow color.
4253   *
4254   * @type { string }
4255   * @default transparent black
4256   * @syscap SystemCapability.ArkUI.ArkUI.Full
4257   * @crossplatform
4258   * @form
4259   * @since 10
4260   */
4261  /**
4262   * Shadow color.
4263   *
4264   * @type { string }
4265   * @default transparent black
4266   * @syscap SystemCapability.ArkUI.ArkUI.Full
4267   * @crossplatform
4268   * @form
4269   * @atomicservice
4270   * @since 11
4271   */
4272  shadowColor: string;
4273
4274  /**
4275   * Horizontal offset distance of the shadow.
4276   *
4277   * @type { number }
4278   * @default 0
4279   * @syscap SystemCapability.ArkUI.ArkUI.Full
4280   * @since 8
4281   */
4282  /**
4283   * Horizontal offset distance of the shadow.
4284   *
4285   * @type { number }
4286   * @default 0
4287   * @syscap SystemCapability.ArkUI.ArkUI.Full
4288   * @form
4289   * @since 9
4290   */
4291  /**
4292   * Horizontal offset distance of the shadow.
4293   *
4294   * @type { number }
4295   * @default 0
4296   * @syscap SystemCapability.ArkUI.ArkUI.Full
4297   * @crossplatform
4298   * @form
4299   * @since 10
4300   */
4301  /**
4302   * Horizontal offset distance of the shadow.
4303   *
4304   * @type { number }
4305   * @default 0
4306   * @syscap SystemCapability.ArkUI.ArkUI.Full
4307   * @crossplatform
4308   * @form
4309   * @atomicservice
4310   * @since 11
4311   */
4312  shadowOffsetX: number;
4313
4314  /**
4315   * Vertical offset distance of the shadow.
4316   *
4317   * @type { number }
4318   * @default 0
4319   * @syscap SystemCapability.ArkUI.ArkUI.Full
4320   * @since 8
4321   */
4322  /**
4323   * Vertical offset distance of the shadow.
4324   *
4325   * @type { number }
4326   * @default 0
4327   * @syscap SystemCapability.ArkUI.ArkUI.Full
4328   * @form
4329   * @since 9
4330   */
4331  /**
4332   * Vertical offset distance of the shadow.
4333   *
4334   * @type { number }
4335   * @default 0
4336   * @syscap SystemCapability.ArkUI.ArkUI.Full
4337   * @crossplatform
4338   * @form
4339   * @since 10
4340   */
4341  /**
4342   * Vertical offset distance of the shadow.
4343   *
4344   * @type { number }
4345   * @default 0
4346   * @syscap SystemCapability.ArkUI.ArkUI.Full
4347   * @crossplatform
4348   * @form
4349   * @atomicservice
4350   * @since 11
4351   */
4352  shadowOffsetY: number;
4353
4354  /**
4355   * Top of the stack pop-up state in the drawing state stack
4356   *
4357   * @syscap SystemCapability.ArkUI.ArkUI.Full
4358   * @since 8
4359   */
4360  /**
4361   * Top of the stack pop-up state in the drawing state stack
4362   *
4363   * @syscap SystemCapability.ArkUI.ArkUI.Full
4364   * @form
4365   * @since 9
4366   */
4367  /**
4368   * Top of the stack pop-up state in the drawing state stack
4369   *
4370   * @syscap SystemCapability.ArkUI.ArkUI.Full
4371   * @crossplatform
4372   * @form
4373   * @since 10
4374   */
4375  /**
4376   * Top of the stack pop-up state in the drawing state stack
4377   *
4378   * @syscap SystemCapability.ArkUI.ArkUI.Full
4379   * @crossplatform
4380   * @form
4381   * @atomicservice
4382   * @since 11
4383   */
4384  restore(): void;
4385
4386  /**
4387   * Saves the current drawing state to the drawing state stack
4388   *
4389   * @syscap SystemCapability.ArkUI.ArkUI.Full
4390   * @since 8
4391   */
4392  /**
4393   * Saves the current drawing state to the drawing state stack
4394   *
4395   * @syscap SystemCapability.ArkUI.ArkUI.Full
4396   * @form
4397   * @since 9
4398   */
4399  /**
4400   * Saves the current drawing state to the drawing state stack
4401   *
4402   * @syscap SystemCapability.ArkUI.ArkUI.Full
4403   * @crossplatform
4404   * @form
4405   * @since 10
4406   */
4407  /**
4408   * Saves the current drawing state to the drawing state stack
4409   *
4410   * @syscap SystemCapability.ArkUI.ArkUI.Full
4411   * @crossplatform
4412   * @form
4413   * @atomicservice
4414   * @since 11
4415   */
4416  save(): void;
4417
4418  /**
4419   * Fills the specified text at the specified location
4420   *
4421   * @param { string } text - Text string to be drawn.
4422   * @param { number } x - The x-axis coordinate of the start point of the text.
4423   * @param { number } y - The y-axis coordinate of the start point of the text.
4424   * @param { number } maxWidth - Maximum width of the drawing.
4425   * @syscap SystemCapability.ArkUI.ArkUI.Full
4426   * @since 8
4427   */
4428  /**
4429   * Fills the specified text at the specified location
4430   *
4431   * @param { string } text - Text string to be drawn.
4432   * @param { number } x - The x-axis coordinate of the start point of the text.
4433   * @param { number } y - The y-axis coordinate of the start point of the text.
4434   * @param { number } maxWidth - Maximum width of the drawing.
4435   * @syscap SystemCapability.ArkUI.ArkUI.Full
4436   * @form
4437   * @since 9
4438   */
4439  /**
4440   * Fills the specified text at the specified location
4441   *
4442   * @param { string } text - Text string to be drawn.
4443   * @param { number } x - The x-axis coordinate of the start point of the text.
4444   * @param { number } y - The y-axis coordinate of the start point of the text.
4445   * @param { number } maxWidth - Maximum width of the drawing.
4446   * @syscap SystemCapability.ArkUI.ArkUI.Full
4447   * @crossplatform
4448   * @form
4449   * @since 10
4450   */
4451  /**
4452   * Fills the specified text at the specified location
4453   *
4454   * @param { string } text - Text string to be drawn.
4455   * @param { number } x - The x-axis coordinate of the start point of the text.
4456   * @param { number } y - The y-axis coordinate of the start point of the text.
4457   * @param { number } maxWidth - Maximum width of the drawing.
4458   * @syscap SystemCapability.ArkUI.ArkUI.Full
4459   * @crossplatform
4460   * @form
4461   * @atomicservice
4462   * @since 11
4463   */
4464  fillText(text: string, x: number, y: number, maxWidth?: number): void;
4465
4466  /**
4467   * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}.
4468   *
4469   * @param { string } text - Text string to be measured.
4470   * @returns { TextMetrics }
4471   * @syscap SystemCapability.ArkUI.ArkUI.Full
4472   * @since 8
4473   */
4474  /**
4475   * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}.
4476   *
4477   * @param { string } text - Text string to be measured.
4478   * @returns { TextMetrics }
4479   * @syscap SystemCapability.ArkUI.ArkUI.Full
4480   * @form
4481   * @since 9
4482   */
4483  /**
4484   * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}.
4485   *
4486   * @param { string } text - Text string to be measured.
4487   * @returns { TextMetrics }
4488   * @syscap SystemCapability.ArkUI.ArkUI.Full
4489   * @crossplatform
4490   * @form
4491   * @since 10
4492   */
4493  /**
4494   * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}.
4495   *
4496   * @param { string } text - Text string to be measured.
4497   * @returns { TextMetrics }
4498   * @syscap SystemCapability.ArkUI.ArkUI.Full
4499   * @crossplatform
4500   * @form
4501   * @atomicservice
4502   * @since 11
4503   */
4504  measureText(text: string): TextMetrics;
4505
4506  /**
4507   * Stroke specified text at specified position
4508   *
4509   * @param { string } text - Text string to be stroked.
4510   * @param { number } x - The x-axis coordinate of the start point of the text.
4511   * @param { number } y - The y-axis-axis coordinate of the start point of the text.
4512   * @param { number } maxWidth - Maximum width of the stroke.
4513   * @syscap SystemCapability.ArkUI.ArkUI.Full
4514   * @since 8
4515   */
4516  /**
4517   * Stroke specified text at specified position
4518   *
4519   * @param { string } text - Text string to be stroked.
4520   * @param { number } x - The x-axis coordinate of the start point of the text.
4521   * @param { number } y - The y-axis-axis coordinate of the start point of the text.
4522   * @param { number } maxWidth - Maximum width of the stroke.
4523   * @syscap SystemCapability.ArkUI.ArkUI.Full
4524   * @form
4525   * @since 9
4526   */
4527  /**
4528   * Stroke specified text at specified position
4529   *
4530   * @param { string } text - Text string to be stroked.
4531   * @param { number } x - The x-axis coordinate of the start point of the text.
4532   * @param { number } y - The y-axis-axis coordinate of the start point of the text.
4533   * @param { number } maxWidth - Maximum width of the stroke.
4534   * @syscap SystemCapability.ArkUI.ArkUI.Full
4535   * @crossplatform
4536   * @form
4537   * @since 10
4538   */
4539  /**
4540   * Stroke specified text at specified position
4541   *
4542   * @param { string } text - Text string to be stroked.
4543   * @param { number } x - The x-axis coordinate of the start point of the text.
4544   * @param { number } y - The y-axis-axis coordinate of the start point of the text.
4545   * @param { number } maxWidth - Maximum width of the stroke.
4546   * @syscap SystemCapability.ArkUI.ArkUI.Full
4547   * @crossplatform
4548   * @form
4549   * @atomicservice
4550   * @since 11
4551   */
4552  strokeText(text: string, x: number, y: number, maxWidth?: number): void;
4553
4554  /**
4555   * Text drawing direction. For details, see {@link CanvasDirection}.
4556   *
4557   * @type { CanvasDirection }
4558   * @default inherit
4559   * @syscap SystemCapability.ArkUI.ArkUI.Full
4560   * @since 8
4561   */
4562  /**
4563   * Text drawing direction. For details, see {@link CanvasDirection}.
4564   *
4565   * @type { CanvasDirection }
4566   * @default inherit
4567   * @syscap SystemCapability.ArkUI.ArkUI.Full
4568   * @form
4569   * @since 9
4570   */
4571  /**
4572   * Text drawing direction. For details, see {@link CanvasDirection}.
4573   *
4574   * @type { CanvasDirection }
4575   * @default inherit
4576   * @syscap SystemCapability.ArkUI.ArkUI.Full
4577   * @crossplatform
4578   * @form
4579   * @since 10
4580   */
4581  /**
4582   * Text drawing direction. For details, see {@link CanvasDirection}.
4583   *
4584   * @type { CanvasDirection }
4585   * @default inherit
4586   * @syscap SystemCapability.ArkUI.ArkUI.Full
4587   * @crossplatform
4588   * @form
4589   * @atomicservice
4590   * @since 11
4591   */
4592  direction: CanvasDirection;
4593
4594  /**
4595   * Font style.
4596   *
4597   * @type { string }
4598   * @default normal normal 14px sans-serif
4599   * @syscap SystemCapability.ArkUI.ArkUI.Full
4600   * @since 8
4601   */
4602  /**
4603   * Font style.
4604   *
4605   * @type { string }
4606   * @default normal normal 14px sans-serif
4607   * @syscap SystemCapability.ArkUI.ArkUI.Full
4608   * @form
4609   * @since 9
4610   */
4611  /**
4612   * Font style.
4613   *
4614   * @type { string }
4615   * @default normal normal 14px sans-serif
4616   * @syscap SystemCapability.ArkUI.ArkUI.Full
4617   * @crossplatform
4618   * @form
4619   * @since 10
4620   */
4621  /**
4622   * Font style.
4623   *
4624   * @type { string }
4625   * @default normal normal 14px sans-serif
4626   * @syscap SystemCapability.ArkUI.ArkUI.Full
4627   * @crossplatform
4628   * @form
4629   * @atomicservice
4630   * @since 11
4631   */
4632  font: string;
4633
4634  /**
4635   * Text alignment mode. For details, see {@link CanvasTextAlign}.
4636   *
4637   * @type { CanvasTextAlign }
4638   * @default start
4639   * @syscap SystemCapability.ArkUI.ArkUI.Full
4640   * @since 8
4641   */
4642  /**
4643   * Text alignment mode. For details, see {@link CanvasTextAlign}.
4644   *
4645   * @type { CanvasTextAlign }
4646   * @default start
4647   * @syscap SystemCapability.ArkUI.ArkUI.Full
4648   * @form
4649   * @since 9
4650   */
4651  /**
4652   * Text alignment mode. For details, see {@link CanvasTextAlign}.
4653   *
4654   * @type { CanvasTextAlign }
4655   * @default start
4656   * @syscap SystemCapability.ArkUI.ArkUI.Full
4657   * @crossplatform
4658   * @form
4659   * @since 10
4660   */
4661  /**
4662   * Text alignment mode. For details, see {@link CanvasTextAlign}.
4663   *
4664   * @type { CanvasTextAlign }
4665   * @default start
4666   * @syscap SystemCapability.ArkUI.ArkUI.Full
4667   * @crossplatform
4668   * @form
4669   * @atomicservice
4670   * @since 11
4671   */
4672  textAlign: CanvasTextAlign;
4673
4674  /**
4675   * Text baseline. For details, see {@link CanvasTextBaseline}.
4676   *
4677   * @type { CanvasTextBaseline }
4678   * @default alphabetic
4679   * @syscap SystemCapability.ArkUI.ArkUI.Full
4680   * @since 8
4681   */
4682  /**
4683   * Text baseline. For details, see {@link CanvasTextBaseline}.
4684   *
4685   * @type { CanvasTextBaseline }
4686   * @default alphabetic
4687   * @syscap SystemCapability.ArkUI.ArkUI.Full
4688   * @form
4689   * @since 9
4690   */
4691  /**
4692   * Text baseline. For details, see {@link CanvasTextBaseline}.
4693   *
4694   * @type { CanvasTextBaseline }
4695   * @default alphabetic
4696   * @syscap SystemCapability.ArkUI.ArkUI.Full
4697   * @crossplatform
4698   * @form
4699   * @since 10
4700   */
4701  /**
4702   * Text baseline. For details, see {@link CanvasTextBaseline}.
4703   *
4704   * @type { CanvasTextBaseline }
4705   * @default alphabetic
4706   * @syscap SystemCapability.ArkUI.ArkUI.Full
4707   * @crossplatform
4708   * @form
4709   * @atomicservice
4710   * @since 11
4711   */
4712  textBaseline: CanvasTextBaseline;
4713
4714  /**
4715   * Obtains the currently applied transformation matrix.
4716   *
4717   * @returns { Matrix2D }
4718   * @syscap SystemCapability.ArkUI.ArkUI.Full
4719   * @since 8
4720   */
4721  /**
4722   * Obtains the currently applied transformation matrix.
4723   *
4724   * @returns { Matrix2D }
4725   * @syscap SystemCapability.ArkUI.ArkUI.Full
4726   * @form
4727   * @since 9
4728   */
4729  /**
4730   * Obtains the currently applied transformation matrix.
4731   *
4732   * @returns { Matrix2D }
4733   * @syscap SystemCapability.ArkUI.ArkUI.Full
4734   * @crossplatform
4735   * @form
4736   * @since 10
4737   */
4738  /**
4739   * Obtains the currently applied transformation matrix.
4740   *
4741   * @returns { Matrix2D }
4742   * @syscap SystemCapability.ArkUI.ArkUI.Full
4743   * @crossplatform
4744   * @form
4745   * @atomicservice
4746   * @since 11
4747   */
4748  getTransform(): Matrix2D;
4749
4750  /**
4751   * Resets the current transformation matrix using the identity matrix
4752   *
4753   * @syscap SystemCapability.ArkUI.ArkUI.Full
4754   * @since 8
4755   */
4756  /**
4757   * Resets the current transformation matrix using the identity matrix
4758   *
4759   * @syscap SystemCapability.ArkUI.ArkUI.Full
4760   * @form
4761   * @since 9
4762   */
4763  /**
4764   * Resets the current transformation matrix using the identity matrix
4765   *
4766   * @syscap SystemCapability.ArkUI.ArkUI.Full
4767   * @crossplatform
4768   * @form
4769   * @since 10
4770   */
4771  /**
4772   * Resets the current transformation matrix using the identity matrix
4773   *
4774   * @syscap SystemCapability.ArkUI.ArkUI.Full
4775   * @crossplatform
4776   * @form
4777   * @atomicservice
4778   * @since 11
4779   */
4780  resetTransform(): void;
4781
4782  /**
4783   * Adds the effect of a rotation
4784   *
4785   * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula:
4786   *    degree * Math.PI / 180
4787   * @syscap SystemCapability.ArkUI.ArkUI.Full
4788   * @since 8
4789   */
4790  /**
4791   * Adds the effect of a rotation
4792   *
4793   * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula:
4794   *    degree * Math.PI / 180
4795   * @syscap SystemCapability.ArkUI.ArkUI.Full
4796   * @form
4797   * @since 9
4798   */
4799  /**
4800   * Adds the effect of a rotation
4801   *
4802   * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula:
4803   *    degree * Math.PI / 180
4804   * @syscap SystemCapability.ArkUI.ArkUI.Full
4805   * @crossplatform
4806   * @form
4807   * @since 10
4808   */
4809  /**
4810   * Adds the effect of a rotation
4811   *
4812   * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula:
4813   *    degree * Math.PI / 180
4814   * @syscap SystemCapability.ArkUI.ArkUI.Full
4815   * @crossplatform
4816   * @form
4817   * @atomicservice
4818   * @since 11
4819   */
4820  rotate(angle: number): void;
4821
4822  /**
4823   * Increases the scaling effect of the X and Y axes.
4824   *
4825   * @param { number } x - Horizontal scaling factor
4826   * @param { number } y - Vertical scaling factor
4827   * @syscap SystemCapability.ArkUI.ArkUI.Full
4828   * @since 8
4829   */
4830  /**
4831   * Increases the scaling effect of the X and Y axes.
4832   *
4833   * @param { number } x - Horizontal scaling factor
4834   * @param { number } y - Vertical scaling factor
4835   * @syscap SystemCapability.ArkUI.ArkUI.Full
4836   * @form
4837   * @since 9
4838   */
4839  /**
4840   * Increases the scaling effect of the X and Y axes.
4841   *
4842   * @param { number } x - Horizontal scaling factor
4843   * @param { number } y - Vertical scaling factor
4844   * @syscap SystemCapability.ArkUI.ArkUI.Full
4845   * @crossplatform
4846   * @form
4847   * @since 10
4848   */
4849  /**
4850   * Increases the scaling effect of the X and Y axes.
4851   *
4852   * @param { number } x - Horizontal scaling factor
4853   * @param { number } y - Vertical scaling factor
4854   * @syscap SystemCapability.ArkUI.ArkUI.Full
4855   * @crossplatform
4856   * @form
4857   * @atomicservice
4858   * @since 11
4859   */
4860  scale(x: number, y: number): void;
4861
4862  /**
4863   * Adds 2D transformation effects, including rotation, translation, and scaling.
4864   *    The current transformation matrix will not be overwritten. Multiple transformations will be superimposed.
4865   *
4866   * @param { number } a - Horizontal Zoom
4867   * @param { number } b - Vertical Tilt
4868   * @param { number } c - Horizontal Tilt
4869   * @param { number } d - Vertical Zoom
4870   * @param { number } e - Horizontal movement
4871   * @param { number } f - Vertical movement
4872   * @syscap SystemCapability.ArkUI.ArkUI.Full
4873   * @since 8
4874   */
4875  /**
4876   * Adds 2D transformation effects, including rotation, translation, and scaling.
4877   *    The current transformation matrix will not be overwritten. Multiple transformations will be superimposed.
4878   *
4879   * @param { number } a - Horizontal Zoom
4880   * @param { number } b - Vertical Tilt
4881   * @param { number } c - Horizontal Tilt
4882   * @param { number } d - Vertical Zoom
4883   * @param { number } e - Horizontal movement
4884   * @param { number } f - Vertical movement
4885   * @syscap SystemCapability.ArkUI.ArkUI.Full
4886   * @form
4887   * @since 9
4888   */
4889  /**
4890   * Adds 2D transformation effects, including rotation, translation, and scaling.
4891   *    The current transformation matrix will not be overwritten. Multiple transformations will be superimposed.
4892   *
4893   * @param { number } a - Horizontal Zoom
4894   * @param { number } b - Vertical Tilt
4895   * @param { number } c - Horizontal Tilt
4896   * @param { number } d - Vertical Zoom
4897   * @param { number } e - Horizontal movement
4898   * @param { number } f - Vertical movement
4899   * @syscap SystemCapability.ArkUI.ArkUI.Full
4900   * @crossplatform
4901   * @form
4902   * @since 10
4903   */
4904  /**
4905   * Adds 2D transformation effects, including rotation, translation, and scaling.
4906   *    The current transformation matrix will not be overwritten. Multiple transformations will be superimposed.
4907   *
4908   * @param { number } a - Horizontal Zoom
4909   * @param { number } b - Vertical Tilt
4910   * @param { number } c - Horizontal Tilt
4911   * @param { number } d - Vertical Zoom
4912   * @param { number } e - Horizontal movement
4913   * @param { number } f - Vertical movement
4914   * @syscap SystemCapability.ArkUI.ArkUI.Full
4915   * @crossplatform
4916   * @form
4917   * @atomicservice
4918   * @since 11
4919   */
4920  setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
4921
4922  /**
4923   * The 2D transformation effect is added. The current transformation matrix is not overwritten and
4924   *    the transformations are superimposed for multiple times.
4925   *
4926   * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}.
4927   * @syscap SystemCapability.ArkUI.ArkUI.Full
4928   * @since 8
4929   */
4930  /**
4931   * The 2D transformation effect is added. The current transformation matrix is not overwritten and
4932   *    the transformations are superimposed for multiple times.
4933   *
4934   * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}.
4935   * @syscap SystemCapability.ArkUI.ArkUI.Full
4936   * @form
4937   * @since 9
4938   */
4939  /**
4940   * The 2D transformation effect is added. The current transformation matrix is not overwritten and
4941   *    the transformations are superimposed for multiple times.
4942   *
4943   * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}.
4944   * @syscap SystemCapability.ArkUI.ArkUI.Full
4945   * @crossplatform
4946   * @form
4947   * @since 10
4948   */
4949  /**
4950   * The 2D transformation effect is added. The current transformation matrix is not overwritten and
4951   *    the transformations are superimposed for multiple times.
4952   *
4953   * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}.
4954   * @syscap SystemCapability.ArkUI.ArkUI.Full
4955   * @crossplatform
4956   * @form
4957   * @atomicservice
4958   * @since 11
4959   */
4960  setTransform(transform?: Matrix2D): void;
4961
4962  /**
4963   * Adds the 2D transformation effect, including rotation, translation, and scaling,
4964   *    and overwrites the current transformation matrix.
4965   *
4966   * @param { number } a - Horizontal Zoom
4967   * @param { number } b - Vertical Tilt
4968   * @param { number } c - Horizontal Tilt
4969   * @param { number } d - Vertical Zoom
4970   * @param { number } e - Horizontal movement
4971   * @param { number } f - Vertical movement
4972   * @syscap SystemCapability.ArkUI.ArkUI.Full
4973   * @since 8
4974   */
4975  /**
4976   * Adds the 2D transformation effect, including rotation, translation, and scaling,
4977   *    and overwrites the current transformation matrix.
4978   *
4979   * @param { number } a - Horizontal Zoom
4980   * @param { number } b - Vertical Tilt
4981   * @param { number } c - Horizontal Tilt
4982   * @param { number } d - Vertical Zoom
4983   * @param { number } e - Horizontal movement
4984   * @param { number } f - Vertical movement
4985   * @syscap SystemCapability.ArkUI.ArkUI.Full
4986   * @form
4987   * @since 9
4988   */
4989  /**
4990   * Adds the 2D transformation effect, including rotation, translation, and scaling,
4991   *    and overwrites the current transformation matrix.
4992   *
4993   * @param { number } a - Horizontal Zoom
4994   * @param { number } b - Vertical Tilt
4995   * @param { number } c - Horizontal Tilt
4996   * @param { number } d - Vertical Zoom
4997   * @param { number } e - Horizontal movement
4998   * @param { number } f - Vertical movement
4999   * @syscap SystemCapability.ArkUI.ArkUI.Full
5000   * @crossplatform
5001   * @form
5002   * @since 10
5003   */
5004  /**
5005   * Adds the 2D transformation effect, including rotation, translation, and scaling,
5006   *    and overwrites the current transformation matrix.
5007   *
5008   * @param { number } a - Horizontal Zoom
5009   * @param { number } b - Vertical Tilt
5010   * @param { number } c - Horizontal Tilt
5011   * @param { number } d - Vertical Zoom
5012   * @param { number } e - Horizontal movement
5013   * @param { number } f - Vertical movement
5014   * @syscap SystemCapability.ArkUI.ArkUI.Full
5015   * @crossplatform
5016   * @form
5017   * @atomicservice
5018   * @since 11
5019   */
5020  transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
5021
5022  /**
5023   * Increases the translation effect of the X and Y axes
5024   *
5025   * @param { number } x - Horizontal movement distance
5026   * @param { number } y - Vertical travel distance
5027   * @syscap SystemCapability.ArkUI.ArkUI.Full
5028   * @since 8
5029   */
5030  /**
5031   * Increases the translation effect of the X and Y axes
5032   *
5033   * @param { number } x - Horizontal movement distance
5034   * @param { number } y - Vertical travel distance
5035   * @syscap SystemCapability.ArkUI.ArkUI.Full
5036   * @form
5037   * @since 9
5038   */
5039  /**
5040   * Increases the translation effect of the X and Y axes
5041   *
5042   * @param { number } x - Horizontal movement distance
5043   * @param { number } y - Vertical travel distance
5044   * @syscap SystemCapability.ArkUI.ArkUI.Full
5045   * @crossplatform
5046   * @form
5047   * @since 10
5048   */
5049  /**
5050   * Increases the translation effect of the X and Y axes
5051   *
5052   * @param { number } x - Horizontal movement distance
5053   * @param { number } y - Vertical travel distance
5054   * @syscap SystemCapability.ArkUI.ArkUI.Full
5055   * @crossplatform
5056   * @form
5057   * @atomicservice
5058   * @since 11
5059   */
5060  translate(x: number, y: number): void;
5061
5062  /**
5063   * Set a PixelMap to the current context. The drawing content is synchronized to the PixelMap.
5064   *
5065   * @param { PixelMap } value - PixelMap object
5066   * @syscap SystemCapability.ArkUI.ArkUI.Full
5067   * @since 8
5068   */
5069  /**
5070   * Set a PixelMap to the current context. The drawing content is synchronized to the PixelMap.
5071   *
5072   * @param { PixelMap } value - PixelMap object
5073   * @syscap SystemCapability.ArkUI.ArkUI.Full
5074   * @crossplatform
5075   * @since 10
5076   */
5077  /**
5078   * Set a PixelMap to the current context. The drawing content is synchronized to the PixelMap.
5079   *
5080   * @param { PixelMap } value - PixelMap object
5081   * @syscap SystemCapability.ArkUI.ArkUI.Full
5082   * @crossplatform
5083   * @atomicservice
5084   * @since 11
5085   */
5086  setPixelMap(value?: PixelMap): void;
5087
5088  /**
5089   * transfer ImageBitmap to content.
5090   *
5091   * @param { ImageBitmap } bitmap
5092   * @syscap SystemCapability.ArkUI.ArkUI.Full
5093   * @since 8
5094   */
5095  /**
5096   * transfer ImageBitmap to content.
5097   *
5098   * @param { ImageBitmap } bitmap
5099   * @syscap SystemCapability.ArkUI.ArkUI.Full
5100   * @form
5101   * @since 9
5102   */
5103  /**
5104   * transfer ImageBitmap to content.
5105   *
5106   * @param { ImageBitmap } bitmap
5107   * @syscap SystemCapability.ArkUI.ArkUI.Full
5108   * @crossplatform
5109   * @form
5110   * @since 10
5111   */
5112  /**
5113   * transfer ImageBitmap to content.
5114   *
5115   * @param { ImageBitmap } bitmap
5116   * @syscap SystemCapability.ArkUI.ArkUI.Full
5117   * @crossplatform
5118   * @form
5119   * @atomicservice
5120   * @since 11
5121   */
5122  transferFromImageBitmap(bitmap: ImageBitmap): void;
5123
5124  /**
5125   * Allocate a layer for subsequent drawing.
5126   *
5127   * @syscap SystemCapability.ArkUI.ArkUI.Full
5128   * @crossplatform
5129   * @atomicservice
5130   * @since 12
5131   */
5132  saveLayer(): void;
5133
5134  /**
5135   * Remove changes to transform and clip since saveLayer was last called and draw the layer on canvas.
5136   *
5137   * @syscap SystemCapability.ArkUI.ArkUI.Full
5138   * @crossplatform
5139   * @atomicservice
5140   * @since 12
5141   */
5142  restoreLayer(): void;
5143
5144  /**
5145   * Clear the backing buffer, drawing state stack, any defined paths, and styles.
5146   *
5147   * @syscap SystemCapability.ArkUI.ArkUI.Full
5148   * @crossplatform
5149   * @atomicservice
5150   * @since 12
5151   */
5152  reset(): void;
5153}
5154
5155/**
5156 * Draw context object for the Canvas component.
5157 *
5158 * @extends CanvasRenderer
5159 * @syscap SystemCapability.ArkUI.ArkUI.Full
5160 * @since 8
5161 */
5162/**
5163 * Draw context object for the Canvas component.
5164 *
5165 * @extends CanvasRenderer
5166 * @syscap SystemCapability.ArkUI.ArkUI.Full
5167 * @form
5168 * @since 9
5169 */
5170/**
5171 * Draw context object for the Canvas component.
5172 *
5173 * @extends CanvasRenderer
5174 * @syscap SystemCapability.ArkUI.ArkUI.Full
5175 * @crossplatform
5176 * @form
5177 * @since 10
5178 */
5179/**
5180 * Draw context object for the Canvas component.
5181 *
5182 * @extends CanvasRenderer
5183 * @syscap SystemCapability.ArkUI.ArkUI.Full
5184 * @crossplatform
5185 * @form
5186 * @atomicservice
5187 * @since 11
5188 */
5189declare class CanvasRenderingContext2D extends CanvasRenderer {
5190  /**
5191   * The default value is 0, which is bound to the height of the specified canvas. The value is read-only.
5192   *
5193   * @type { number }
5194   * @syscap SystemCapability.ArkUI.ArkUI.Full
5195   * @since 8
5196   */
5197  /**
5198   * The default value is 0, which is bound to the height of the specified canvas. The value is read-only.
5199   *
5200   * @type { number }
5201   * @syscap SystemCapability.ArkUI.ArkUI.Full
5202   * @form
5203   * @since 9
5204   */
5205  /**
5206   * The default value is 0, which is bound to the height of the specified canvas. The value is read-only.
5207   *
5208   * @type { number }
5209   * @syscap SystemCapability.ArkUI.ArkUI.Full
5210   * @crossplatform
5211   * @form
5212   * @since 10
5213   */
5214  /**
5215   * The default value is 0, which is bound to the height of the specified canvas. The value is read-only.
5216   *
5217   * @type { number }
5218   * @syscap SystemCapability.ArkUI.ArkUI.Full
5219   * @crossplatform
5220   * @form
5221   * @atomicservice
5222   * @since 11
5223   */
5224  readonly height: number;
5225
5226  /**
5227   * The default value is 0, which is bound to the width of the specified canvas. The value is read-only.
5228   *
5229   * @type { number }
5230   * @syscap SystemCapability.ArkUI.ArkUI.Full
5231   * @since 8
5232   */
5233  /**
5234   * The default value is 0, which is bound to the width of the specified canvas. The value is read-only.
5235   *
5236   * @type { number }
5237   * @syscap SystemCapability.ArkUI.ArkUI.Full
5238   * @form
5239   * @since 9
5240   */
5241  /**
5242   * The default value is 0, which is bound to the width of the specified canvas. The value is read-only.
5243   *
5244   * @type { number }
5245   * @syscap SystemCapability.ArkUI.ArkUI.Full
5246   * @crossplatform
5247   * @form
5248   * @since 10
5249   */
5250  /**
5251   * The default value is 0, which is bound to the width of the specified canvas. The value is read-only.
5252   *
5253   * @type { number }
5254   * @syscap SystemCapability.ArkUI.ArkUI.Full
5255   * @crossplatform
5256   * @form
5257   * @atomicservice
5258   * @since 11
5259   */
5260  readonly width: number;
5261
5262  /**
5263   * Frame node of the canvas. The default value is null.
5264   *
5265   * @type { FrameNode }
5266   * @syscap SystemCapability.ArkUI.ArkUI.Full
5267   * @crossplatform
5268   * @atomicservice
5269   * @since 13
5270   */
5271  readonly canvas: FrameNode;
5272
5273  /**
5274   * Generate a character string in the data url format.
5275   *
5276   * @param { string } type - Image format. The default value is image/png.
5277   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5278   *    If the value is out of the range, the default value 0.92 is used.
5279   * @returns { string }
5280   * @syscap SystemCapability.ArkUI.ArkUI.Full
5281   * @since 8
5282   */
5283  /**
5284   * Generate a character string in the data url format.
5285   *
5286   * @param { string } type - Image format. The default value is image/png.
5287   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5288   *    If the value is out of the range, the default value 0.92 is used.
5289   * @returns { string }
5290   * @syscap SystemCapability.ArkUI.ArkUI.Full
5291   * @form
5292   * @since 9
5293   */
5294  /**
5295   * Generate a character string in the data url format.
5296   *
5297   * @param { string } type - Image format. The default value is image/png.
5298   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5299   *    If the value is out of the range, the default value 0.92 is used.
5300   * @returns { string }
5301   * @syscap SystemCapability.ArkUI.ArkUI.Full
5302   * @crossplatform
5303   * @form
5304   * @since 10
5305   */
5306  /**
5307   * Generate a character string in the data url format.
5308   *
5309   * @param { string } type - Image format. The default value is image/png.
5310   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5311   *    If the value is out of the range, the default value 0.92 is used.
5312   * @returns { string }
5313   * @syscap SystemCapability.ArkUI.ArkUI.Full
5314   * @crossplatform
5315   * @form
5316   * @atomicservice
5317   * @since 11
5318   */
5319  toDataURL(type?: string, quality?: any): string;
5320
5321  /**
5322   * Start image analyzer.
5323   *
5324   * @param { ImageAnalyzerConfig } config - Image analyzer config.
5325   * @returns { Promise<void> } The promise returned by the function.
5326   * @throws { BusinessError } 110001 - Image analysis feature is not supported.
5327   * @throws { BusinessError } 110002 - Image analysis is currently being executed.
5328   * @syscap SystemCapability.ArkUI.ArkUI.Full
5329   * @atomicservice
5330   * @since 12
5331   */
5332  startImageAnalyzer(config: ImageAnalyzerConfig): Promise<void>;
5333
5334  /**
5335   * Stop image analyzer.
5336   * @syscap SystemCapability.ArkUI.ArkUI.Full
5337   * @atomicservice
5338   * @since 12
5339   */
5340  stopImageAnalyzer(): void;
5341
5342  /**
5343   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5344   *
5345   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5346   * @syscap SystemCapability.ArkUI.ArkUI.Full
5347   * @since 8
5348   */
5349  /**
5350   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5351   *
5352   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5353   * @syscap SystemCapability.ArkUI.ArkUI.Full
5354   * @form
5355   * @since 9
5356   */
5357  /**
5358   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5359   *
5360   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5361   * @syscap SystemCapability.ArkUI.ArkUI.Full
5362   * @crossplatform
5363   * @form
5364   * @since 10
5365   */
5366  /**
5367   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5368   *
5369   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5370   * @syscap SystemCapability.ArkUI.ArkUI.Full
5371   * @crossplatform
5372   * @form
5373   * @atomicservice
5374   * @since 11
5375   */
5376  constructor(settings?: RenderingContextSettings);
5377
5378  /**
5379   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5380   *
5381   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5382   * @param { LengthMetricsUnit } [unit] - the unit mode
5383   * @syscap SystemCapability.ArkUI.ArkUI.Full
5384   * @crossplatform
5385   * @form
5386   * @atomicservice
5387   * @since 12
5388   */
5389  constructor(settings?: RenderingContextSettings, unit?: LengthMetricsUnit);
5390
5391  /**
5392   * Register the listener that watches if the canvasrenderingcontext2d attached to the Canvas frameNode.
5393   *
5394   * @param { 'onAttach' } type Indicates the type of event.
5395   * @param { Callback<void> } callback Indicates the listener.
5396   * @throws { BusinessError } 401 - Input parameter error. Possible causes:
5397   *     1. Mandatory parameters are left unspecified;
5398   *     2. Incorrect parameter types;
5399   *     3. Parameter verification failed.
5400   * @syscap SystemCapability.ArkUI.ArkUI.Full
5401   * @crossplatform
5402   * @atomicservice
5403   * @since 13
5404   */
5405  on(type: 'onAttach', callback: Callback<void>): void;
5406
5407  /**
5408   * Unregister the listener that watches if the canvasrenderingcontext2d attached to the Canvas frameNode.
5409   *
5410   * @param { 'onAttach' } type Indicates the type of event.
5411   * @param { Callback<void> } callback Indicates the listener.
5412   * @throws { BusinessError } 401 - Input parameter error. Possible causes:
5413   *     1. Mandatory parameters are left unspecified;
5414   *     2. Incorrect parameter types;
5415   *     3. Parameter verification failed.
5416   * @syscap SystemCapability.ArkUI.ArkUI.Full
5417   * @crossplatform
5418   * @atomicservice
5419   * @since 13
5420   */
5421  off(type: 'onAttach', callback?: Callback<void>): void;
5422
5423  /**
5424   * Register the listener that watches if the canvasrenderingcontext2d detached from the Canvas frameNode.
5425   *
5426   * @param { 'onDetach' } type Indicates the type of event.
5427   * @param { Callback<void> } callback Indicates the listener.
5428   * @throws { BusinessError } 401 - Input parameter error. Possible causes:
5429   *     1. Mandatory parameters are left unspecified;
5430   *     2. Incorrect parameter types;
5431   *     3. Parameter verification failed.
5432   * @syscap SystemCapability.ArkUI.ArkUI.Full
5433   * @crossplatform
5434   * @atomicservice
5435   * @since 13
5436   */
5437  on(type: 'onDetach', callback: Callback<void>): void;
5438
5439  /**
5440   * Unregister the listener that watches if the canvasrenderingcontext2d detached from the Canvas frameNode.
5441   *
5442   * @param { 'onDetach' } type Indicates the type of event.
5443   * @param { Callback<void> } callback Indicates the listener.
5444   * @throws { BusinessError } 401 - Input parameter error. Possible causes:
5445   *     1. Mandatory parameters are left unspecified;
5446   *     2. Incorrect parameter types;
5447   *     3. Parameter verification failed.
5448   * @syscap SystemCapability.ArkUI.ArkUI.Full
5449   * @crossplatform
5450   * @atomicservice
5451   * @since 13
5452   */
5453  off(type: 'onDetach', callback?: Callback<void>): void;
5454}
5455
5456/**
5457 * Draw context object for the OffscreenCanvas component.
5458 *
5459 * @extends CanvasRenderer
5460 * @syscap SystemCapability.ArkUI.ArkUI.Full
5461 * @since 8
5462 */
5463/**
5464 * Draw context object for the OffscreenCanvas component.
5465 *
5466 * @extends CanvasRenderer
5467 * @syscap SystemCapability.ArkUI.ArkUI.Full
5468 * @form
5469 * @since 9
5470 */
5471/**
5472 * Draw context object for the OffscreenCanvas component.
5473 *
5474 * @extends CanvasRenderer
5475 * @syscap SystemCapability.ArkUI.ArkUI.Full
5476 * @crossplatform
5477 * @form
5478 * @since 10
5479 */
5480/**
5481 * Draw context object for the OffscreenCanvas component.
5482 *
5483 * @extends CanvasRenderer
5484 * @syscap SystemCapability.ArkUI.ArkUI.Full
5485 * @crossplatform
5486 * @form
5487 * @atomicservice
5488 * @since 11
5489 */
5490declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer {
5491  /**
5492   * Generate a character string in the data url format.
5493   *
5494   * @param { string } type - Image format. The default value is image/png.
5495   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5496   *    If the value is out of the range, the default value 0.92 is used.
5497   * @returns { string }
5498   * @syscap SystemCapability.ArkUI.ArkUI.Full
5499   * @since 8
5500   */
5501  /**
5502   * Generate a character string in the data url format.
5503   *
5504   * @param { string } type - Image format. The default value is image/png.
5505   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5506   *    If the value is out of the range, the default value 0.92 is used.
5507   * @returns { string }
5508   * @syscap SystemCapability.ArkUI.ArkUI.Full
5509   * @form
5510   * @since 9
5511   */
5512  /**
5513   * Generate a character string in the data url format.
5514   *
5515   * @param { string } type - Image format. The default value is image/png.
5516   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5517   *    If the value is out of the range, the default value 0.92 is used.
5518   * @returns { string }
5519   * @syscap SystemCapability.ArkUI.ArkUI.Full
5520   * @crossplatform
5521   * @form
5522   * @since 10
5523   */
5524  /**
5525   * Generate a character string in the data url format.
5526   *
5527   * @param { string } type - Image format. The default value is image/png.
5528   * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1.
5529   *    If the value is out of the range, the default value 0.92 is used.
5530   * @returns { string }
5531   * @syscap SystemCapability.ArkUI.ArkUI.Full
5532   * @crossplatform
5533   * @form
5534   * @atomicservice
5535   * @since 11
5536   */
5537  toDataURL(type?: string, quality?: any): string;
5538
5539  /**
5540   * transfer the content to ImageBitmap
5541   *
5542   * @returns { ImageBitmap }
5543   * @syscap SystemCapability.ArkUI.ArkUI.Full
5544   * @since 8
5545   */
5546  /**
5547   * transfer the content to ImageBitmap
5548   *
5549   * @returns { ImageBitmap }
5550   * @syscap SystemCapability.ArkUI.ArkUI.Full
5551   * @form
5552   * @since 9
5553   */
5554  /**
5555   * transfer the content to ImageBitmap
5556   *
5557   * @returns { ImageBitmap }
5558   * @syscap SystemCapability.ArkUI.ArkUI.Full
5559   * @crossplatform
5560   * @form
5561   * @since 10
5562   */
5563  /**
5564   * transfer the content to ImageBitmap
5565   *
5566   * @returns { ImageBitmap }
5567   * @syscap SystemCapability.ArkUI.ArkUI.Full
5568   * @crossplatform
5569   * @form
5570   * @atomicservice
5571   * @since 11
5572   */
5573  transferToImageBitmap(): ImageBitmap;
5574
5575  /**
5576   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5577   *
5578   * @param { number } width - the width of the OffscreenCanvas
5579   * @param { number } height - the height of the OffscreenCanvas
5580   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5581   * @syscap SystemCapability.ArkUI.ArkUI.Full
5582   * @since 8
5583   */
5584  /**
5585   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5586   *
5587   * @param { number } width - the width of the OffscreenCanvas
5588   * @param { number } height - the height of the OffscreenCanvas
5589   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5590   * @syscap SystemCapability.ArkUI.ArkUI.Full
5591   * @form
5592   * @since 9
5593   */
5594  /**
5595   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5596   *
5597   * @param { number } width - the width of the OffscreenCanvas
5598   * @param { number } height - the height of the OffscreenCanvas
5599   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5600   * @syscap SystemCapability.ArkUI.ArkUI.Full
5601   * @crossplatform
5602   * @form
5603   * @since 10
5604   */
5605  /**
5606   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5607   *
5608   * @param { number } width - the width of the OffscreenCanvas
5609   * @param { number } height - the height of the OffscreenCanvas
5610   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5611   * @syscap SystemCapability.ArkUI.ArkUI.Full
5612   * @crossplatform
5613   * @form
5614   * @atomicservice
5615   * @since 11
5616   */
5617  constructor(width: number, height: number, settings?: RenderingContextSettings);
5618
5619  /**
5620   * Constructor of the canvas drawing context object, which is used to create a drawing context object.
5621   *
5622   * @param { number } width - the width of the OffscreenCanvas
5623   * @param { number } height - the height of the OffscreenCanvas
5624   * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}.
5625   * @param { LengthMetricsUnit } [unit] - the unit mode
5626   * @syscap SystemCapability.ArkUI.ArkUI.Full
5627   * @crossplatform
5628   * @form
5629   * @atomicservice
5630   * @since 12
5631   */
5632  constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit);
5633}
5634
5635/**
5636 * Draw an object off the screen. The drawing content is not directly displayed on the screen.
5637 *
5638 * @extends CanvasRenderer
5639 * @syscap SystemCapability.ArkUI.ArkUI.Full
5640 * @since 8
5641 */
5642/**
5643 * Draw an object off the screen. The drawing content is not directly displayed on the screen.
5644 *
5645 * @extends CanvasRenderer
5646 * @syscap SystemCapability.ArkUI.ArkUI.Full
5647 * @form
5648 * @since 9
5649 */
5650/**
5651 * Draw an object off the screen. The drawing content is not directly displayed on the screen.
5652 *
5653 * @extends CanvasRenderer
5654 * @syscap SystemCapability.ArkUI.ArkUI.Full
5655 * @crossplatform
5656 * @form
5657 * @since 10
5658 */
5659/**
5660 * Draw an object off the screen. The drawing content is not directly displayed on the screen.
5661 *
5662 * @syscap SystemCapability.ArkUI.ArkUI.Full
5663 * @crossplatform
5664 * @form
5665 * @atomicservice
5666 * @since 11
5667 */
5668declare class OffscreenCanvas {
5669  /**
5670   * Height of the off-screen canvas.
5671   *
5672   * @type { number }
5673   * @syscap SystemCapability.ArkUI.ArkUI.Full
5674   * @since 8
5675   */
5676  /**
5677   * Height of the off-screen canvas.
5678   *
5679   * @type { number }
5680   * @syscap SystemCapability.ArkUI.ArkUI.Full
5681   * @form
5682   * @since 9
5683   */
5684  /**
5685   * Height of the off-screen canvas.
5686   *
5687   * @type { number }
5688   * @syscap SystemCapability.ArkUI.ArkUI.Full
5689   * @crossplatform
5690   * @form
5691   * @since 10
5692   */
5693  /**
5694   * Height of the off-screen canvas.
5695   *
5696   * @type { number }
5697   * @syscap SystemCapability.ArkUI.ArkUI.Full
5698   * @crossplatform
5699   * @form
5700   * @atomicservice
5701   * @since 11
5702   */
5703  height: number;
5704
5705  /**
5706   * Width of the off-screen canvas.
5707   *
5708   * @type { number }
5709   * @syscap SystemCapability.ArkUI.ArkUI.Full
5710   * @since 8
5711   */
5712  /**
5713   * Width of the off-screen canvas.
5714   *
5715   * @type { number }
5716   * @syscap SystemCapability.ArkUI.ArkUI.Full
5717   * @form
5718   * @since 9
5719   */
5720  /**
5721   * Width of the off-screen canvas.
5722   *
5723   * @type { number }
5724   * @syscap SystemCapability.ArkUI.ArkUI.Full
5725   * @crossplatform
5726   * @form
5727   * @since 10
5728   */
5729  /**
5730   * Width of the off-screen canvas.
5731   *
5732   * @type { number }
5733   * @syscap SystemCapability.ArkUI.ArkUI.Full
5734   * @crossplatform
5735   * @form
5736   * @atomicservice
5737   * @since 11
5738   */
5739  width: number;
5740
5741  /**
5742   * Exports rendered content as an ImageBitmap object
5743   *
5744   * @returns { ImageBitmap }
5745   * @syscap SystemCapability.ArkUI.ArkUI.Full
5746   * @since 8
5747   */
5748  /**
5749   * Exports rendered content as an ImageBitmap object
5750   *
5751   * @returns { ImageBitmap }
5752   * @syscap SystemCapability.ArkUI.ArkUI.Full
5753   * @form
5754   * @since 9
5755   */
5756  /**
5757   * Exports rendered content as an ImageBitmap object
5758   *
5759   * @returns { ImageBitmap }
5760   * @syscap SystemCapability.ArkUI.ArkUI.Full
5761   * @crossplatform
5762   * @form
5763   * @since 10
5764   */
5765  /**
5766   * Exports rendered content as an ImageBitmap object
5767   *
5768   * @returns { ImageBitmap }
5769   * @syscap SystemCapability.ArkUI.ArkUI.Full
5770   * @crossplatform
5771   * @form
5772   * @atomicservice
5773   * @since 11
5774   */
5775  transferToImageBitmap(): ImageBitmap;
5776
5777  /**
5778   * Creates the context from the current OffscreenCanvas.
5779   *
5780   * @param { "2d" } contextType - The context type, only "2d" be supported now.
5781   *  "2d": Creates a {@link OffscreenCanvasRenderingContext2D} object representing a two-dimensional rendering context.
5782   * @param { RenderingContextSettings } options - Drawing attribute. For details, see {@link RenderingContextSettings}.
5783   * @returns { OffscreenCanvasRenderingContext2D } The rendering context of offscreen canvas, see {@link OffscreenCanvasRenderingContext2D}.
5784   * @syscap SystemCapability.ArkUI.ArkUI.Full
5785   * @crossplatform
5786   * @since 10
5787   */
5788  /**
5789   * Creates the context from the current OffscreenCanvas.
5790   *
5791   * @param { "2d" } contextType - The context type, only "2d" be supported now.
5792   *  "2d": Creates a {@link OffscreenCanvasRenderingContext2D} object representing a two-dimensional rendering context.
5793   * @param { RenderingContextSettings } options - Drawing attribute. For details, see {@link RenderingContextSettings}.
5794   * @returns { OffscreenCanvasRenderingContext2D } The rendering context of offscreen canvas, see {@link OffscreenCanvasRenderingContext2D}.
5795   * @syscap SystemCapability.ArkUI.ArkUI.Full
5796   * @crossplatform
5797   * @atomicservice
5798   * @since 11
5799   */
5800  getContext(contextType: "2d", options?: RenderingContextSettings): OffscreenCanvasRenderingContext2D;
5801
5802  /**
5803   * Constructor of the off-screen canvas, which is used to create an off-screen canvas object.
5804   *
5805   * @param { number } width - Width of the off-screen canvas.
5806   * @param { number } height - Height of the off-screen canvas.
5807   * @syscap SystemCapability.ArkUI.ArkUI.Full
5808   * @since 8
5809   */
5810  /**
5811   * Constructor of the off-screen canvas, which is used to create an off-screen canvas object.
5812   *
5813   * @param { number } width - Width of the off-screen canvas.
5814   * @param { number } height - Height of the off-screen canvas.
5815   * @syscap SystemCapability.ArkUI.ArkUI.Full
5816   * @form
5817   * @since 9
5818   */
5819  /**
5820   * Constructor of the off-screen canvas, which is used to create an off-screen canvas object.
5821   *
5822   * @param { number } width - Width of the off-screen canvas.
5823   * @param { number } height - Height of the off-screen canvas.
5824   * @syscap SystemCapability.ArkUI.ArkUI.Full
5825   * @crossplatform
5826   * @form
5827   * @since 10
5828   */
5829  /**
5830   * Constructor of the off-screen canvas, which is used to create an off-screen canvas object.
5831   *
5832   * @param { number } width - Width of the off-screen canvas.
5833   * @param { number } height - Height of the off-screen canvas.
5834   * @syscap SystemCapability.ArkUI.ArkUI.Full
5835   * @crossplatform
5836   * @form
5837   * @atomicservice
5838   * @since 11
5839   */
5840  constructor(width: number, height: number);
5841
5842  /**
5843   * Constructor of the off-screen canvas, which is used to create an off-screen canvas object.
5844   *
5845   * @param { number } width - Width of the off-screen canvas.
5846   * @param { number } height - Height of the off-screen canvas.
5847   * @param { LengthMetricsUnit } [unit] - the unit mode
5848   * @syscap SystemCapability.ArkUI.ArkUI.Full
5849   * @crossplatform
5850   * @form
5851   * @atomicservice
5852   * @since 12
5853   */
5854  constructor(width: number, height: number, unit: LengthMetricsUnit);
5855}
5856
5857/**
5858 * Size info.
5859 *
5860 * @interface Size
5861 * @syscap SystemCapability.ArkUI.ArkUI.Full
5862 * @crossplatform
5863 * @atomicservice
5864 * @since 12
5865 */
5866declare interface Size {
5867  /**
5868   * Defines the width property.
5869   *
5870   * @type { number }
5871   * @syscap SystemCapability.ArkUI.ArkUI.Full
5872   * @crossplatform
5873   * @atomicservice
5874   * @since 12
5875   */
5876  width: number;
5877
5878  /**
5879   * Defines the height property.
5880   *
5881   * @type { number }
5882   * @syscap SystemCapability.ArkUI.ArkUI.Full
5883   * @crossplatform
5884   * @atomicservice
5885   * @since 12
5886   */
5887  height: number;
5888}
5889
5890/**
5891 * Defines DrawingRenderingContext.
5892 *
5893 * @syscap SystemCapability.ArkUI.ArkUI.Full
5894 * @crossplatform
5895 * @atomicservice
5896 * @since 12
5897 */
5898declare class DrawingRenderingContext {
5899
5900  /**
5901   * Get size of the DrawingRenderingContext.
5902   *
5903   * @returns { Size } The size of the DrawingRenderingContext.
5904   * @syscap SystemCapability.ArkUI.ArkUI.Full
5905   * @crossplatform
5906   * @atomicservice
5907   * @since 12
5908   */
5909  get size(): Size;
5910
5911  /**
5912   * Get canvas of the DrawingRenderingContext.
5913   *
5914   * @returns { DrawingCanvas } The canvas of the DrawingRenderingContext.
5915   * @syscap SystemCapability.ArkUI.ArkUI.Full
5916   * @crossplatform
5917   * @atomicservice
5918   * @since 12
5919   */
5920  get canvas(): DrawingCanvas;
5921
5922  /**
5923   * Invalidate the component, which will cause a re-render of the component.
5924   *
5925   * @syscap SystemCapability.ArkUI.ArkUI.Full
5926   * @crossplatform
5927   * @atomicservice
5928   * @since 12
5929   */
5930  invalidate(): void;
5931
5932  /**
5933   * Create DrawingRenderingContext with setting LengthMetricsUnit.
5934   *
5935   * @param { LengthMetricsUnit } [unit] - the unit mode
5936   * @syscap SystemCapability.ArkUI.ArkUI.Full
5937   * @crossplatform
5938   * @form
5939   * @atomicservice
5940   * @since 12
5941   */
5942  constructor(unit?: LengthMetricsUnit);
5943}
5944
5945/**
5946 *TextTimer component, which provides the text timer capability.
5947 *
5948 * @interface CanvasInterface
5949 * @syscap SystemCapability.ArkUI.ArkUI.Full
5950 * @since 8
5951 */
5952/**
5953 *TextTimer component, which provides the text timer capability.
5954 *
5955 * @interface CanvasInterface
5956 * @syscap SystemCapability.ArkUI.ArkUI.Full
5957 * @form
5958 * @since 9
5959 */
5960/**
5961 *TextTimer component, which provides the text timer capability.
5962 *
5963 * @interface CanvasInterface
5964 * @syscap SystemCapability.ArkUI.ArkUI.Full
5965 * @crossplatform
5966 * @form
5967 * @since 10
5968 */
5969/**
5970 *TextTimer component, which provides the text timer capability.
5971 *
5972 * @interface CanvasInterface
5973 * @syscap SystemCapability.ArkUI.ArkUI.Full
5974 * @crossplatform
5975 * @form
5976 * @atomicservice
5977 * @since 11
5978 */
5979interface CanvasInterface {
5980  /**
5981   * Construct a canvas component.
5982   *
5983   * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}.
5984   * @returns { CanvasAttribute }
5985   * @syscap SystemCapability.ArkUI.ArkUI.Full
5986   * @since 8
5987   */
5988  /**
5989   * Construct a canvas component.
5990   *
5991   * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}.
5992   * @returns { CanvasAttribute }
5993   * @syscap SystemCapability.ArkUI.ArkUI.Full
5994   * @form
5995   * @since 9
5996   */
5997  /**
5998   * Construct a canvas component.
5999   *
6000   * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}.
6001   * @returns { CanvasAttribute }
6002   * @syscap SystemCapability.ArkUI.ArkUI.Full
6003   * @crossplatform
6004   * @form
6005   * @since 10
6006   */
6007  /**
6008   * Construct a canvas component.
6009   *
6010   * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}.
6011   * @returns { CanvasAttribute }
6012   * @syscap SystemCapability.ArkUI.ArkUI.Full
6013   * @crossplatform
6014   * @form
6015   * @atomicservice
6016   * @since 11
6017   */
6018  /**
6019   * Construct a canvas component.
6020   *
6021   * @param { CanvasRenderingContext2D | DrawingRenderingContext } context - Canvas context object.
6022   * @returns { CanvasAttribute }
6023   * @syscap SystemCapability.ArkUI.ArkUI.Full
6024   * @crossplatform
6025   * @form
6026   * @atomicservice
6027   * @since 12
6028   */
6029  (context?: CanvasRenderingContext2D | DrawingRenderingContext): CanvasAttribute;
6030
6031  /**
6032   * Construct a canvas component.
6033   *
6034   * @param { CanvasRenderingContext2D | DrawingRenderingContext } context - Canvas context object.
6035   * @param { ImageAIOptions } imageAIOptions
6036   * @returns { CanvasAttribute }
6037   * @syscap SystemCapability.ArkUI.ArkUI.Full
6038   * @atomicservice
6039   * @since 12
6040   */
6041  (context: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions: ImageAIOptions): CanvasAttribute;
6042}
6043
6044/**
6045 * Provides attribute for Canvas.
6046 *
6047 * @extends CommonMethod<CanvasAttribute>
6048 * @syscap SystemCapability.ArkUI.ArkUI.Full
6049 * @since 8
6050 */
6051/**
6052 * Provides attribute for Canvas.
6053 *
6054 * @extends CommonMethod<CanvasAttribute>
6055 * @syscap SystemCapability.ArkUI.ArkUI.Full
6056 * @form
6057 * @since 9
6058 */
6059/**
6060 * Provides attribute for Canvas.
6061 *
6062 * @extends CommonMethod<CanvasAttribute>
6063 * @syscap SystemCapability.ArkUI.ArkUI.Full
6064 * @crossplatform
6065 * @form
6066 * @since 10
6067 */
6068/**
6069 * Provides attribute for Canvas.
6070 *
6071 * @extends CommonMethod<CanvasAttribute>
6072 * @syscap SystemCapability.ArkUI.ArkUI.Full
6073 * @crossplatform
6074 * @form
6075 * @atomicservice
6076 * @since 11
6077 */
6078declare class CanvasAttribute extends CommonMethod<CanvasAttribute> {
6079  /**
6080   * Event notification after the canvas component is constructed. You can draw the canvas at this time.
6081   *
6082   * @param { function } event
6083   * @returns { CanvasAttribute }
6084   * @syscap SystemCapability.ArkUI.ArkUI.Full
6085   * @since 8
6086   */
6087  /**
6088   * Event notification after the canvas component is constructed. You can draw the canvas at this time.
6089   *
6090   * @param { function } event
6091   * @returns { CanvasAttribute }
6092   * @syscap SystemCapability.ArkUI.ArkUI.Full
6093   * @form
6094   * @since 9
6095   */
6096  /**
6097   * Event notification after the canvas component is constructed. You can draw the canvas at this time.
6098   *
6099   * @param { function } event
6100   * @returns { CanvasAttribute }
6101   * @syscap SystemCapability.ArkUI.ArkUI.Full
6102   * @crossplatform
6103   * @form
6104   * @since 10
6105   */
6106  /**
6107   * Event notification after the canvas component is constructed. You can draw the canvas at this time.
6108   *
6109   * @param { function } event
6110   * @returns { CanvasAttribute }
6111   * @syscap SystemCapability.ArkUI.ArkUI.Full
6112   * @crossplatform
6113   * @form
6114   * @atomicservice
6115   * @since 11
6116   */
6117  onReady(event: () => void): CanvasAttribute;
6118
6119  /**
6120   * Enable image analyzer for Canvas.
6121   *
6122   * @param { boolean } enable - If enable image analyzer for Canvas. The default value is false.
6123   * @returns { CanvasAttribute }
6124   * @syscap SystemCapability.ArkUI.ArkUI.Full
6125   * @atomicservice
6126   * @since 12
6127   */
6128  enableAnalyzer(enable: boolean): CanvasAttribute;
6129}
6130
6131/**
6132 * Defines Canvas Component.
6133 *
6134 * @syscap SystemCapability.ArkUI.ArkUI.Full
6135 * @since 8
6136 */
6137/**
6138 * Defines Canvas Component.
6139 *
6140 * @syscap SystemCapability.ArkUI.ArkUI.Full
6141 * @form
6142 * @since 9
6143 */
6144/**
6145 * Defines Canvas Component.
6146 *
6147 * @syscap SystemCapability.ArkUI.ArkUI.Full
6148 * @crossplatform
6149 * @form
6150 * @since 10
6151 */
6152/**
6153 * Defines Canvas Component.
6154 *
6155 * @syscap SystemCapability.ArkUI.ArkUI.Full
6156 * @crossplatform
6157 * @form
6158 * @atomicservice
6159 * @since 11
6160 */
6161declare const Canvas: CanvasInterface;
6162
6163/**
6164 * Defines Canvas Component instance.
6165 *
6166 * @syscap SystemCapability.ArkUI.ArkUI.Full
6167 * @since 8
6168 */
6169/**
6170 * Defines Canvas Component instance.
6171 *
6172 * @syscap SystemCapability.ArkUI.ArkUI.Full
6173 * @form
6174 * @since 9
6175 */
6176/**
6177 * Defines Canvas Component instance.
6178 *
6179 * @syscap SystemCapability.ArkUI.ArkUI.Full
6180 * @crossplatform
6181 * @form
6182 * @since 10
6183 */
6184/**
6185 * Defines Canvas Component instance.
6186 *
6187 * @syscap SystemCapability.ArkUI.ArkUI.Full
6188 * @crossplatform
6189 * @form
6190 * @atomicservice
6191 * @since 11
6192 */
6193declare const CanvasInstance: CanvasAttribute;