161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit ArkUI 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ci/** 2261847f8eSopenharmony_ci * Import the drawing canvas type object for Canvas. 2361847f8eSopenharmony_ci * 2461847f8eSopenharmony_ci * @typedef { import('../api/@ohos.graphics.drawing').default.Canvas } DrawingCanvas 2561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 2661847f8eSopenharmony_ci * @crossplatform 2761847f8eSopenharmony_ci * @atomicservice 2861847f8eSopenharmony_ci * @since 12 2961847f8eSopenharmony_ci */ 3061847f8eSopenharmony_cideclare type DrawingCanvas = import('../api/@ohos.graphics.drawing').default.Canvas; 3161847f8eSopenharmony_ci 3261847f8eSopenharmony_ci/** 3361847f8eSopenharmony_ci * Filling style algorithm, which determines whether a point is within or outside the path. The following 3461847f8eSopenharmony_ci * two configurations are supported: 3561847f8eSopenharmony_ci * "evenodd": odd and even round rule 3661847f8eSopenharmony_ci * "nonzero": (Default) Non-zero Wrap Rules 3761847f8eSopenharmony_ci * 3861847f8eSopenharmony_ci * @typedef { "evenodd" | "nonzero" } CanvasFillRule 3961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4061847f8eSopenharmony_ci * @since 8 4161847f8eSopenharmony_ci */ 4261847f8eSopenharmony_ci/** 4361847f8eSopenharmony_ci * Filling style algorithm, which determines whether a point is within or outside the path. The following 4461847f8eSopenharmony_ci * two configurations are supported: 4561847f8eSopenharmony_ci * "evenodd": odd and even round rule 4661847f8eSopenharmony_ci * "nonzero": (Default) Non-zero Wrap Rules 4761847f8eSopenharmony_ci * 4861847f8eSopenharmony_ci * @typedef { "evenodd" | "nonzero" } CanvasFillRule 4961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 5061847f8eSopenharmony_ci * @form 5161847f8eSopenharmony_ci * @since 9 5261847f8eSopenharmony_ci */ 5361847f8eSopenharmony_ci/** 5461847f8eSopenharmony_ci * Filling style algorithm, which determines whether a point is within or outside the path. The following 5561847f8eSopenharmony_ci * two configurations are supported: 5661847f8eSopenharmony_ci * "evenodd": odd and even round rule 5761847f8eSopenharmony_ci * "nonzero": (Default) Non-zero Wrap Rules 5861847f8eSopenharmony_ci * 5961847f8eSopenharmony_ci * @typedef { "evenodd" | "nonzero" } CanvasFillRule 6061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 6161847f8eSopenharmony_ci * @crossplatform 6261847f8eSopenharmony_ci * @form 6361847f8eSopenharmony_ci * @since 10 6461847f8eSopenharmony_ci */ 6561847f8eSopenharmony_ci/** 6661847f8eSopenharmony_ci * Filling style algorithm, which determines whether a point is within or outside the path. The following 6761847f8eSopenharmony_ci * two configurations are supported: 6861847f8eSopenharmony_ci * "evenodd": odd and even round rule 6961847f8eSopenharmony_ci * "nonzero": (Default) Non-zero Wrap Rules 7061847f8eSopenharmony_ci * 7161847f8eSopenharmony_ci * @typedef { "evenodd" | "nonzero" } CanvasFillRule 7261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7361847f8eSopenharmony_ci * @crossplatform 7461847f8eSopenharmony_ci * @form 7561847f8eSopenharmony_ci * @atomicservice 7661847f8eSopenharmony_ci * @since 11 7761847f8eSopenharmony_ci */ 7861847f8eSopenharmony_cideclare type CanvasFillRule = "evenodd" | "nonzero"; 7961847f8eSopenharmony_ci 8061847f8eSopenharmony_ci/** 8161847f8eSopenharmony_ci * Specifies the attribute of drawing the end of each line segment. The following configurations are supported: 8261847f8eSopenharmony_ci * "butt": (Default) Segment Ends in Square 8361847f8eSopenharmony_ci * "round": Segment ends in a circle 8461847f8eSopenharmony_ci * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width 8561847f8eSopenharmony_ci * as the segment and is half the thickness of the segment. 8661847f8eSopenharmony_ci * 8761847f8eSopenharmony_ci * @typedef { "butt" | "round" | "square" } CanvasLineCap 8861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 8961847f8eSopenharmony_ci * @since 8 9061847f8eSopenharmony_ci */ 9161847f8eSopenharmony_ci/** 9261847f8eSopenharmony_ci * Specifies the attribute of drawing the end of each line segment. The following configurations are supported: 9361847f8eSopenharmony_ci * "butt": (Default) Segment Ends in Square 9461847f8eSopenharmony_ci * "round": Segment ends in a circle 9561847f8eSopenharmony_ci * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width 9661847f8eSopenharmony_ci * as the segment and is half the thickness of the segment. 9761847f8eSopenharmony_ci * 9861847f8eSopenharmony_ci * @typedef { "butt" | "round" | "square" } CanvasLineCap 9961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 10061847f8eSopenharmony_ci * @form 10161847f8eSopenharmony_ci * @since 9 10261847f8eSopenharmony_ci */ 10361847f8eSopenharmony_ci/** 10461847f8eSopenharmony_ci * Specifies the attribute of drawing the end of each line segment. The following configurations are supported: 10561847f8eSopenharmony_ci * "butt": (Default) Segment Ends in Square 10661847f8eSopenharmony_ci * "round": Segment ends in a circle 10761847f8eSopenharmony_ci * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width 10861847f8eSopenharmony_ci * as the segment and is half the thickness of the segment. 10961847f8eSopenharmony_ci * 11061847f8eSopenharmony_ci * @typedef { "butt" | "round" | "square" } CanvasLineCap 11161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 11261847f8eSopenharmony_ci * @crossplatform 11361847f8eSopenharmony_ci * @form 11461847f8eSopenharmony_ci * @since 10 11561847f8eSopenharmony_ci */ 11661847f8eSopenharmony_ci/** 11761847f8eSopenharmony_ci * Specifies the attribute of drawing the end of each line segment. The following configurations are supported: 11861847f8eSopenharmony_ci * "butt": (Default) Segment Ends in Square 11961847f8eSopenharmony_ci * "round": Segment ends in a circle 12061847f8eSopenharmony_ci * "square": The end of the segment ends in a square, but a rectangular area is added that is the same width 12161847f8eSopenharmony_ci * as the segment and is half the thickness of the segment. 12261847f8eSopenharmony_ci * 12361847f8eSopenharmony_ci * @typedef { "butt" | "round" | "square" } CanvasLineCap 12461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12561847f8eSopenharmony_ci * @crossplatform 12661847f8eSopenharmony_ci * @form 12761847f8eSopenharmony_ci * @atomicservice 12861847f8eSopenharmony_ci * @since 11 12961847f8eSopenharmony_ci */ 13061847f8eSopenharmony_cideclare type CanvasLineCap = "butt" | "round" | "square"; 13161847f8eSopenharmony_ci 13261847f8eSopenharmony_ci/** 13361847f8eSopenharmony_ci * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0 13461847f8eSopenharmony_ci * are connected together. The following three configurations are supported: 13561847f8eSopenharmony_ci * "bevel": Fill the ends of the connected sections with an additional triangle-base area, 13661847f8eSopenharmony_ci * each with its own independent rectangular corner. 13761847f8eSopenharmony_ci * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions 13861847f8eSopenharmony_ci * so that they intersect at a point. 13961847f8eSopenharmony_ci * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the 14061847f8eSopenharmony_ci * connected section. The radius of the fillet is the width of the segment. 14161847f8eSopenharmony_ci * 14261847f8eSopenharmony_ci * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin 14361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 14461847f8eSopenharmony_ci * @since 8 14561847f8eSopenharmony_ci */ 14661847f8eSopenharmony_ci/** 14761847f8eSopenharmony_ci * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0 14861847f8eSopenharmony_ci * are connected together. The following three configurations are supported: 14961847f8eSopenharmony_ci * "bevel": Fill the ends of the connected sections with an additional triangle-base area, 15061847f8eSopenharmony_ci * each with its own independent rectangular corner. 15161847f8eSopenharmony_ci * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions 15261847f8eSopenharmony_ci * so that they intersect at a point. 15361847f8eSopenharmony_ci * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the 15461847f8eSopenharmony_ci * connected section. The radius of the fillet is the width of the segment. 15561847f8eSopenharmony_ci * 15661847f8eSopenharmony_ci * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin 15761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 15861847f8eSopenharmony_ci * @form 15961847f8eSopenharmony_ci * @since 9 16061847f8eSopenharmony_ci */ 16161847f8eSopenharmony_ci/** 16261847f8eSopenharmony_ci * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0 16361847f8eSopenharmony_ci * are connected together. The following three configurations are supported: 16461847f8eSopenharmony_ci * "bevel": Fill the ends of the connected sections with an additional triangle-base area, 16561847f8eSopenharmony_ci * each with its own independent rectangular corner. 16661847f8eSopenharmony_ci * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions 16761847f8eSopenharmony_ci * so that they intersect at a point. 16861847f8eSopenharmony_ci * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the 16961847f8eSopenharmony_ci * connected section. The radius of the fillet is the width of the segment. 17061847f8eSopenharmony_ci * 17161847f8eSopenharmony_ci * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin 17261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 17361847f8eSopenharmony_ci * @crossplatform 17461847f8eSopenharmony_ci * @form 17561847f8eSopenharmony_ci * @since 10 17661847f8eSopenharmony_ci */ 17761847f8eSopenharmony_ci/** 17861847f8eSopenharmony_ci * Sets the attribute of how two connected parts (line segments, arcs, and curves) whose length is not 0 17961847f8eSopenharmony_ci * are connected together. The following three configurations are supported: 18061847f8eSopenharmony_ci * "bevel": Fill the ends of the connected sections with an additional triangle-base area, 18161847f8eSopenharmony_ci * each with its own independent rectangular corner. 18261847f8eSopenharmony_ci * "miter": (Default) An additional diamond region is formed by extending the outer edges of the connected portions 18361847f8eSopenharmony_ci * so that they intersect at a point. 18461847f8eSopenharmony_ci * "round": Draw the shape of the corner by filling in an additional sector with the center at the end of the 18561847f8eSopenharmony_ci * connected section. The radius of the fillet is the width of the segment. 18661847f8eSopenharmony_ci * 18761847f8eSopenharmony_ci * @typedef { "bevel" | "miter" | "round" } CanvasLineJoin 18861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 18961847f8eSopenharmony_ci * @crossplatform 19061847f8eSopenharmony_ci * @form 19161847f8eSopenharmony_ci * @atomicservice 19261847f8eSopenharmony_ci * @since 11 19361847f8eSopenharmony_ci */ 19461847f8eSopenharmony_cideclare type CanvasLineJoin = "bevel" | "miter" | "round"; 19561847f8eSopenharmony_ci 19661847f8eSopenharmony_ci/** 19761847f8eSopenharmony_ci * Indicates the attribute of the current text direction. The options are as follows: 19861847f8eSopenharmony_ci * "inherit": (Default) Inherit current Canvas component settings 19961847f8eSopenharmony_ci * "ltr": The text direction is left to right. 20061847f8eSopenharmony_ci * "rtl": The text direction is from right to left. 20161847f8eSopenharmony_ci * 20261847f8eSopenharmony_ci * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection 20361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 20461847f8eSopenharmony_ci * @since 8 20561847f8eSopenharmony_ci */ 20661847f8eSopenharmony_ci/** 20761847f8eSopenharmony_ci * Indicates the attribute of the current text direction. The options are as follows: 20861847f8eSopenharmony_ci * "inherit": (Default) Inherit current Canvas component settings 20961847f8eSopenharmony_ci * "ltr": The text direction is left to right. 21061847f8eSopenharmony_ci * "rtl": The text direction is from right to left. 21161847f8eSopenharmony_ci * 21261847f8eSopenharmony_ci * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection 21361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 21461847f8eSopenharmony_ci * @form 21561847f8eSopenharmony_ci * @since 9 21661847f8eSopenharmony_ci */ 21761847f8eSopenharmony_ci/** 21861847f8eSopenharmony_ci * Indicates the attribute of the current text direction. The options are as follows: 21961847f8eSopenharmony_ci * "inherit": (Default) Inherit current Canvas component settings 22061847f8eSopenharmony_ci * "ltr": The text direction is left to right. 22161847f8eSopenharmony_ci * "rtl": The text direction is from right to left. 22261847f8eSopenharmony_ci * 22361847f8eSopenharmony_ci * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection 22461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 22561847f8eSopenharmony_ci * @crossplatform 22661847f8eSopenharmony_ci * @form 22761847f8eSopenharmony_ci * @since 10 22861847f8eSopenharmony_ci */ 22961847f8eSopenharmony_ci/** 23061847f8eSopenharmony_ci * Indicates the attribute of the current text direction. The options are as follows: 23161847f8eSopenharmony_ci * "inherit": (Default) Inherit current Canvas component settings 23261847f8eSopenharmony_ci * "ltr": The text direction is left to right. 23361847f8eSopenharmony_ci * "rtl": The text direction is from right to left. 23461847f8eSopenharmony_ci * 23561847f8eSopenharmony_ci * @typedef { "inherit" | "ltr" | "rtl" } CanvasDirection 23661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 23761847f8eSopenharmony_ci * @crossplatform 23861847f8eSopenharmony_ci * @form 23961847f8eSopenharmony_ci * @atomicservice 24061847f8eSopenharmony_ci * @since 11 24161847f8eSopenharmony_ci */ 24261847f8eSopenharmony_cideclare type CanvasDirection = "inherit" | "ltr" | "rtl"; 24361847f8eSopenharmony_ci 24461847f8eSopenharmony_ci/** 24561847f8eSopenharmony_ci * Describes the alignment mode for drawing text. The options are as follows: 24661847f8eSopenharmony_ci * "center": The text is centered. 24761847f8eSopenharmony_ci * "end": Where text aligns lines end (Left alignment refers to the local from left to right, 24861847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 24961847f8eSopenharmony_ci * "left": The text is left-aligned. 25061847f8eSopenharmony_ci * "right": The text is right-aligned. 25161847f8eSopenharmony_ci * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, 25261847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 25361847f8eSopenharmony_ci * 25461847f8eSopenharmony_ci * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign 25561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 25661847f8eSopenharmony_ci * @since 8 25761847f8eSopenharmony_ci */ 25861847f8eSopenharmony_ci/** 25961847f8eSopenharmony_ci * Describes the alignment mode for drawing text. The options are as follows: 26061847f8eSopenharmony_ci * "center": The text is centered. 26161847f8eSopenharmony_ci * "end": Where text aligns lines end (Left alignment refers to the local from left to right, 26261847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 26361847f8eSopenharmony_ci * "left": The text is left-aligned. 26461847f8eSopenharmony_ci * "right": The text is right-aligned. 26561847f8eSopenharmony_ci * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, 26661847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 26761847f8eSopenharmony_ci * 26861847f8eSopenharmony_ci * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign 26961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 27061847f8eSopenharmony_ci * @form 27161847f8eSopenharmony_ci * @since 9 27261847f8eSopenharmony_ci */ 27361847f8eSopenharmony_ci/** 27461847f8eSopenharmony_ci * Describes the alignment mode for drawing text. The options are as follows: 27561847f8eSopenharmony_ci * "center": The text is centered. 27661847f8eSopenharmony_ci * "end": Where text aligns lines end (Left alignment refers to the local from left to right, 27761847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 27861847f8eSopenharmony_ci * "left": The text is left-aligned. 27961847f8eSopenharmony_ci * "right": The text is right-aligned. 28061847f8eSopenharmony_ci * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, 28161847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 28261847f8eSopenharmony_ci * 28361847f8eSopenharmony_ci * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign 28461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 28561847f8eSopenharmony_ci * @crossplatform 28661847f8eSopenharmony_ci * @form 28761847f8eSopenharmony_ci * @since 10 28861847f8eSopenharmony_ci */ 28961847f8eSopenharmony_ci/** 29061847f8eSopenharmony_ci * Describes the alignment mode for drawing text. The options are as follows: 29161847f8eSopenharmony_ci * "center": The text is centered. 29261847f8eSopenharmony_ci * "end": Where text aligns lines end (Left alignment refers to the local from left to right, 29361847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 29461847f8eSopenharmony_ci * "left": The text is left-aligned. 29561847f8eSopenharmony_ci * "right": The text is right-aligned. 29661847f8eSopenharmony_ci * "start": (Default) Where the text snap line begins (Left alignment refers to the local from left to right, 29761847f8eSopenharmony_ci * and right alignment refers to the local from right to left) 29861847f8eSopenharmony_ci * 29961847f8eSopenharmony_ci * @typedef { "center" | "end" | "left" | "right" | "start" } CanvasTextAlign 30061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 30161847f8eSopenharmony_ci * @crossplatform 30261847f8eSopenharmony_ci * @form 30361847f8eSopenharmony_ci * @atomicservice 30461847f8eSopenharmony_ci * @since 11 30561847f8eSopenharmony_ci */ 30661847f8eSopenharmony_cideclare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; 30761847f8eSopenharmony_ci 30861847f8eSopenharmony_ci/** 30961847f8eSopenharmony_ci * Text baseline, which supports the following configurations: 31061847f8eSopenharmony_ci * "alphabetic": (Default) The text baseline is the standard letter baseline. 31161847f8eSopenharmony_ci * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline 31261847f8eSopenharmony_ci * and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters. 31361847f8eSopenharmony_ci * "hanging": The text baseline is a hanging baseline. 31461847f8eSopenharmony_ci * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic 31561847f8eSopenharmony_ci * baseline, the ideographic baseline is at the bottom of the character itself. 31661847f8eSopenharmony_ci * "middle": The text baseline is in the middle of the text block. 31761847f8eSopenharmony_ci * "top": The text baseline is at the top of the text block. 31861847f8eSopenharmony_ci * 31961847f8eSopenharmony_ci * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline 32061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 32161847f8eSopenharmony_ci * @since 8 32261847f8eSopenharmony_ci */ 32361847f8eSopenharmony_ci/** 32461847f8eSopenharmony_ci * Text baseline, which supports the following configurations: 32561847f8eSopenharmony_ci * "alphabetic": (Default) The text baseline is the standard letter baseline. 32661847f8eSopenharmony_ci * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline 32761847f8eSopenharmony_ci * and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters. 32861847f8eSopenharmony_ci * "hanging": The text baseline is a hanging baseline. 32961847f8eSopenharmony_ci * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic 33061847f8eSopenharmony_ci * baseline, the ideographic baseline is at the bottom of the character itself. 33161847f8eSopenharmony_ci * "middle": The text baseline is in the middle of the text block. 33261847f8eSopenharmony_ci * "top": The text baseline is at the top of the text block. 33361847f8eSopenharmony_ci * 33461847f8eSopenharmony_ci * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline 33561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 33661847f8eSopenharmony_ci * @form 33761847f8eSopenharmony_ci * @since 9 33861847f8eSopenharmony_ci */ 33961847f8eSopenharmony_ci/** 34061847f8eSopenharmony_ci * Text baseline, which supports the following configurations: 34161847f8eSopenharmony_ci * "alphabetic": (Default) The text baseline is the standard letter baseline. 34261847f8eSopenharmony_ci * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline 34361847f8eSopenharmony_ci * and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters. 34461847f8eSopenharmony_ci * "hanging": The text baseline is a hanging baseline. 34561847f8eSopenharmony_ci * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic 34661847f8eSopenharmony_ci * baseline, the ideographic baseline is at the bottom of the character itself. 34761847f8eSopenharmony_ci * "middle": The text baseline is in the middle of the text block. 34861847f8eSopenharmony_ci * "top": The text baseline is at the top of the text block. 34961847f8eSopenharmony_ci * 35061847f8eSopenharmony_ci * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline 35161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 35261847f8eSopenharmony_ci * @crossplatform 35361847f8eSopenharmony_ci * @form 35461847f8eSopenharmony_ci * @since 10 35561847f8eSopenharmony_ci */ 35661847f8eSopenharmony_ci/** 35761847f8eSopenharmony_ci * Text baseline, which supports the following configurations: 35861847f8eSopenharmony_ci * "alphabetic": (Default) The text baseline is the standard letter baseline. 35961847f8eSopenharmony_ci * "bottom": The text baseline is at the bottom of the text block. The difference between the ideographic baseline 36061847f8eSopenharmony_ci * and the ideographic baseline is that the ideographic baseline does not need to consider downlink letters. 36161847f8eSopenharmony_ci * "hanging": The text baseline is a hanging baseline. 36261847f8eSopenharmony_ci * "ideographic": The text baseline is the ideographic baseline; If the character itself exceeds the alphabetic 36361847f8eSopenharmony_ci * baseline, the ideographic baseline is at the bottom of the character itself. 36461847f8eSopenharmony_ci * "middle": The text baseline is in the middle of the text block. 36561847f8eSopenharmony_ci * "top": The text baseline is at the top of the text block. 36661847f8eSopenharmony_ci * 36761847f8eSopenharmony_ci * @typedef { "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" } CanvasTextBaseline 36861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 36961847f8eSopenharmony_ci * @crossplatform 37061847f8eSopenharmony_ci * @form 37161847f8eSopenharmony_ci * @atomicservice 37261847f8eSopenharmony_ci * @since 11 37361847f8eSopenharmony_ci */ 37461847f8eSopenharmony_cideclare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top"; 37561847f8eSopenharmony_ci 37661847f8eSopenharmony_ci/** 37761847f8eSopenharmony_ci * Sets the image smoothness attribute. The options are as follows: 37861847f8eSopenharmony_ci * "high": height 37961847f8eSopenharmony_ci * "low": (default)low 38061847f8eSopenharmony_ci * "medium": medium 38161847f8eSopenharmony_ci * 38261847f8eSopenharmony_ci * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality 38361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 38461847f8eSopenharmony_ci * @since 8 38561847f8eSopenharmony_ci */ 38661847f8eSopenharmony_ci/** 38761847f8eSopenharmony_ci * Sets the image smoothness attribute. The options are as follows: 38861847f8eSopenharmony_ci * "high": height 38961847f8eSopenharmony_ci * "low": (default)low 39061847f8eSopenharmony_ci * "medium": medium 39161847f8eSopenharmony_ci * 39261847f8eSopenharmony_ci * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality 39361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 39461847f8eSopenharmony_ci * @form 39561847f8eSopenharmony_ci * @since 9 39661847f8eSopenharmony_ci */ 39761847f8eSopenharmony_ci/** 39861847f8eSopenharmony_ci * Sets the image smoothness attribute. The options are as follows: 39961847f8eSopenharmony_ci * "high": height 40061847f8eSopenharmony_ci * "low": (default)low 40161847f8eSopenharmony_ci * "medium": medium 40261847f8eSopenharmony_ci * 40361847f8eSopenharmony_ci * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality 40461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 40561847f8eSopenharmony_ci * @crossplatform 40661847f8eSopenharmony_ci * @form 40761847f8eSopenharmony_ci * @since 10 40861847f8eSopenharmony_ci */ 40961847f8eSopenharmony_ci/** 41061847f8eSopenharmony_ci * Sets the image smoothness attribute. The options are as follows: 41161847f8eSopenharmony_ci * "high": height 41261847f8eSopenharmony_ci * "low": (default)low 41361847f8eSopenharmony_ci * "medium": medium 41461847f8eSopenharmony_ci * 41561847f8eSopenharmony_ci * @typedef { "high" | "low" | "medium" } ImageSmoothingQuality 41661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 41761847f8eSopenharmony_ci * @crossplatform 41861847f8eSopenharmony_ci * @form 41961847f8eSopenharmony_ci * @atomicservice 42061847f8eSopenharmony_ci * @since 11 42161847f8eSopenharmony_ci */ 42261847f8eSopenharmony_cideclare type ImageSmoothingQuality = "high" | "low" | "medium"; 42361847f8eSopenharmony_ci 42461847f8eSopenharmony_ci/** 42561847f8eSopenharmony_ci * Import the frame node type object for Canvas. 42661847f8eSopenharmony_ci * 42761847f8eSopenharmony_ci * @typedef { import('../api/arkui/FrameNode').FrameNode } FrameNode 42861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 42961847f8eSopenharmony_ci * @crossplatform 43061847f8eSopenharmony_ci * @atomicservice 43161847f8eSopenharmony_ci * @since 13 43261847f8eSopenharmony_ci */ 43361847f8eSopenharmony_cideclare type FrameNode = import('../api/arkui/FrameNode').FrameNode; 43461847f8eSopenharmony_ci 43561847f8eSopenharmony_ci/** 43661847f8eSopenharmony_ci * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient() 43761847f8eSopenharmony_ci * 43861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 43961847f8eSopenharmony_ci * @since 8 44061847f8eSopenharmony_ci */ 44161847f8eSopenharmony_ci/** 44261847f8eSopenharmony_ci * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient() 44361847f8eSopenharmony_ci * 44461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 44561847f8eSopenharmony_ci * @form 44661847f8eSopenharmony_ci * @since 9 44761847f8eSopenharmony_ci */ 44861847f8eSopenharmony_ci/** 44961847f8eSopenharmony_ci * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient() 45061847f8eSopenharmony_ci * 45161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 45261847f8eSopenharmony_ci * @crossplatform 45361847f8eSopenharmony_ci * @form 45461847f8eSopenharmony_ci * @since 10 45561847f8eSopenharmony_ci */ 45661847f8eSopenharmony_ci/** 45761847f8eSopenharmony_ci * Opaque objects that describe gradients, created by createLinearGradient() or createRadialGradient() 45861847f8eSopenharmony_ci * 45961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 46061847f8eSopenharmony_ci * @crossplatform 46161847f8eSopenharmony_ci * @form 46261847f8eSopenharmony_ci * @atomicservice 46361847f8eSopenharmony_ci * @since 11 46461847f8eSopenharmony_ci */ 46561847f8eSopenharmony_cideclare class CanvasGradient { 46661847f8eSopenharmony_ci /** 46761847f8eSopenharmony_ci * Add a breakpoint defined by offset and color to the gradient 46861847f8eSopenharmony_ci * 46961847f8eSopenharmony_ci * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error 47061847f8eSopenharmony_ci * @param { string } color - CSS color value <color>. If the color value cannot be resolved to a valid CSS color value <color> 47161847f8eSopenharmony_ci * a SYNTAX_ERR error is thrown. 47261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 47361847f8eSopenharmony_ci * @since 8 47461847f8eSopenharmony_ci */ 47561847f8eSopenharmony_ci /** 47661847f8eSopenharmony_ci * Add a breakpoint defined by offset and color to the gradient 47761847f8eSopenharmony_ci * 47861847f8eSopenharmony_ci * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error 47961847f8eSopenharmony_ci * @param { string } color - CSS color value <color>. If the color value cannot be resolved to a valid CSS color value <color> 48061847f8eSopenharmony_ci * a SYNTAX_ERR error is thrown. 48161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 48261847f8eSopenharmony_ci * @form 48361847f8eSopenharmony_ci * @since 9 48461847f8eSopenharmony_ci */ 48561847f8eSopenharmony_ci /** 48661847f8eSopenharmony_ci * Add a breakpoint defined by offset and color to the gradient 48761847f8eSopenharmony_ci * 48861847f8eSopenharmony_ci * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error 48961847f8eSopenharmony_ci * @param { string } color - Set the gradient color. 49061847f8eSopenharmony_ci * a SYNTAX_ERR error is thrown. 49161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 49261847f8eSopenharmony_ci * @crossplatform 49361847f8eSopenharmony_ci * @form 49461847f8eSopenharmony_ci * @since 10 49561847f8eSopenharmony_ci */ 49661847f8eSopenharmony_ci /** 49761847f8eSopenharmony_ci * Add a breakpoint defined by offset and color to the gradient 49861847f8eSopenharmony_ci * 49961847f8eSopenharmony_ci * @param { number } offset - Value between 0 and 1, out of range throws INDEX_SIZE_ERR error 50061847f8eSopenharmony_ci * @param { string } color - Set the gradient color. 50161847f8eSopenharmony_ci * a SYNTAX_ERR error is thrown. 50261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 50361847f8eSopenharmony_ci * @crossplatform 50461847f8eSopenharmony_ci * @form 50561847f8eSopenharmony_ci * @atomicservice 50661847f8eSopenharmony_ci * @since 11 50761847f8eSopenharmony_ci */ 50861847f8eSopenharmony_ci addColorStop(offset: number, color: string): void; 50961847f8eSopenharmony_ci} 51061847f8eSopenharmony_ci 51161847f8eSopenharmony_ci/** 51261847f8eSopenharmony_ci * Path object, which provides basic methods for drawing paths. 51361847f8eSopenharmony_ci * 51461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 51561847f8eSopenharmony_ci * @since 8 51661847f8eSopenharmony_ci */ 51761847f8eSopenharmony_ci/** 51861847f8eSopenharmony_ci * Path object, which provides basic methods for drawing paths. 51961847f8eSopenharmony_ci * 52061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 52161847f8eSopenharmony_ci * @form 52261847f8eSopenharmony_ci * @since 9 52361847f8eSopenharmony_ci */ 52461847f8eSopenharmony_ci/** 52561847f8eSopenharmony_ci * Path object, which provides basic methods for drawing paths. 52661847f8eSopenharmony_ci * 52761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 52861847f8eSopenharmony_ci * @crossplatform 52961847f8eSopenharmony_ci * @form 53061847f8eSopenharmony_ci * @since 10 53161847f8eSopenharmony_ci */ 53261847f8eSopenharmony_ci/** 53361847f8eSopenharmony_ci * Path object, which provides basic methods for drawing paths. 53461847f8eSopenharmony_ci * 53561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 53661847f8eSopenharmony_ci * @crossplatform 53761847f8eSopenharmony_ci * @form 53861847f8eSopenharmony_ci * @atomicservice 53961847f8eSopenharmony_ci * @since 11 54061847f8eSopenharmony_ci */ 54161847f8eSopenharmony_cideclare class CanvasPath { 54261847f8eSopenharmony_ci /** 54361847f8eSopenharmony_ci * Draw an arc path 54461847f8eSopenharmony_ci * 54561847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc. 54661847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc. 54761847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 54861847f8eSopenharmony_ci * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. 54961847f8eSopenharmony_ci * @param { number } endAngle - The end point of the arc, in radians. 55061847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, 55161847f8eSopenharmony_ci * the arc is drawn clockwise. The default value is false. 55261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 55361847f8eSopenharmony_ci * @since 8 55461847f8eSopenharmony_ci */ 55561847f8eSopenharmony_ci /** 55661847f8eSopenharmony_ci * Draw an arc path 55761847f8eSopenharmony_ci * 55861847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc. 55961847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc. 56061847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 56161847f8eSopenharmony_ci * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. 56261847f8eSopenharmony_ci * @param { number } endAngle - The end point of the arc, in radians. 56361847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, 56461847f8eSopenharmony_ci * the arc is drawn clockwise. The default value is false. 56561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 56661847f8eSopenharmony_ci * @form 56761847f8eSopenharmony_ci * @since 9 56861847f8eSopenharmony_ci */ 56961847f8eSopenharmony_ci /** 57061847f8eSopenharmony_ci * Draw an arc path 57161847f8eSopenharmony_ci * 57261847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc. 57361847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc. 57461847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 57561847f8eSopenharmony_ci * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. 57661847f8eSopenharmony_ci * @param { number } endAngle - The end point of the arc, in radians. 57761847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, 57861847f8eSopenharmony_ci * the arc is drawn clockwise. The default value is false. 57961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 58061847f8eSopenharmony_ci * @crossplatform 58161847f8eSopenharmony_ci * @form 58261847f8eSopenharmony_ci * @since 10 58361847f8eSopenharmony_ci */ 58461847f8eSopenharmony_ci /** 58561847f8eSopenharmony_ci * Draw an arc path 58661847f8eSopenharmony_ci * 58761847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the center (center of the circle) of the arc. 58861847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the center (center of the circle) of the arc. 58961847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 59061847f8eSopenharmony_ci * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. 59161847f8eSopenharmony_ci * @param { number } endAngle - The end point of the arc, in radians. 59261847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, 59361847f8eSopenharmony_ci * the arc is drawn clockwise. The default value is false. 59461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 59561847f8eSopenharmony_ci * @crossplatform 59661847f8eSopenharmony_ci * @form 59761847f8eSopenharmony_ci * @atomicservice 59861847f8eSopenharmony_ci * @since 11 59961847f8eSopenharmony_ci */ 60061847f8eSopenharmony_ci arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; 60161847f8eSopenharmony_ci 60261847f8eSopenharmony_ci /** 60361847f8eSopenharmony_ci * Draw arc paths based on control points and radius 60461847f8eSopenharmony_ci * 60561847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the first control point. 60661847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the first control point. 60761847f8eSopenharmony_ci * @param { number } x2 - The x-axis coordinate of the second control point. 60861847f8eSopenharmony_ci * @param { number } y2 - The y-axis coordinate of the second control point. 60961847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 61061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 61161847f8eSopenharmony_ci * @since 8 61261847f8eSopenharmony_ci */ 61361847f8eSopenharmony_ci /** 61461847f8eSopenharmony_ci * Draw arc paths based on control points and radius 61561847f8eSopenharmony_ci * 61661847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the first control point. 61761847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the first control point. 61861847f8eSopenharmony_ci * @param { number } x2 - The x-axis coordinate of the second control point. 61961847f8eSopenharmony_ci * @param { number } y2 - The y-axis coordinate of the second control point. 62061847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 62161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 62261847f8eSopenharmony_ci * @form 62361847f8eSopenharmony_ci * @since 9 62461847f8eSopenharmony_ci */ 62561847f8eSopenharmony_ci /** 62661847f8eSopenharmony_ci * Draw arc paths based on control points and radius 62761847f8eSopenharmony_ci * 62861847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the first control point. 62961847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the first control point. 63061847f8eSopenharmony_ci * @param { number } x2 - The x-axis coordinate of the second control point. 63161847f8eSopenharmony_ci * @param { number } y2 - The y-axis coordinate of the second control point. 63261847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 63361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 63461847f8eSopenharmony_ci * @crossplatform 63561847f8eSopenharmony_ci * @form 63661847f8eSopenharmony_ci * @since 10 63761847f8eSopenharmony_ci */ 63861847f8eSopenharmony_ci /** 63961847f8eSopenharmony_ci * Draw arc paths based on control points and radius 64061847f8eSopenharmony_ci * 64161847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the first control point. 64261847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the first control point. 64361847f8eSopenharmony_ci * @param { number } x2 - The x-axis coordinate of the second control point. 64461847f8eSopenharmony_ci * @param { number } y2 - The y-axis coordinate of the second control point. 64561847f8eSopenharmony_ci * @param { number } radius - Radius of the arc. 64661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 64761847f8eSopenharmony_ci * @crossplatform 64861847f8eSopenharmony_ci * @form 64961847f8eSopenharmony_ci * @atomicservice 65061847f8eSopenharmony_ci * @since 11 65161847f8eSopenharmony_ci */ 65261847f8eSopenharmony_ci arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; 65361847f8eSopenharmony_ci 65461847f8eSopenharmony_ci /** 65561847f8eSopenharmony_ci * Drawing Cubic Bessel Curve Paths 65661847f8eSopenharmony_ci * 65761847f8eSopenharmony_ci * @param { number } cp1x - The x-axis coordinate of the first control point. 65861847f8eSopenharmony_ci * @param { number } cp1y - The y-axis coordinate of the first control point. 65961847f8eSopenharmony_ci * @param { number } cp2x - The x-axis coordinate of the second control point. 66061847f8eSopenharmony_ci * @param { number } cp2y - The y-axis coordinate of the second control point. 66161847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 66261847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 66361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 66461847f8eSopenharmony_ci * @since 8 66561847f8eSopenharmony_ci */ 66661847f8eSopenharmony_ci /** 66761847f8eSopenharmony_ci * Drawing Cubic Bessel Curve Paths 66861847f8eSopenharmony_ci * 66961847f8eSopenharmony_ci * @param { number } cp1x - The x-axis coordinate of the first control point. 67061847f8eSopenharmony_ci * @param { number } cp1y - The y-axis coordinate of the first control point. 67161847f8eSopenharmony_ci * @param { number } cp2x - The x-axis coordinate of the second control point. 67261847f8eSopenharmony_ci * @param { number } cp2y - The y-axis coordinate of the second control point. 67361847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 67461847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 67561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 67661847f8eSopenharmony_ci * @form 67761847f8eSopenharmony_ci * @since 9 67861847f8eSopenharmony_ci */ 67961847f8eSopenharmony_ci /** 68061847f8eSopenharmony_ci * Drawing Cubic Bessel Curve Paths 68161847f8eSopenharmony_ci * 68261847f8eSopenharmony_ci * @param { number } cp1x - The x-axis coordinate of the first control point. 68361847f8eSopenharmony_ci * @param { number } cp1y - The y-axis coordinate of the first control point. 68461847f8eSopenharmony_ci * @param { number } cp2x - The x-axis coordinate of the second control point. 68561847f8eSopenharmony_ci * @param { number } cp2y - The y-axis coordinate of the second control point. 68661847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 68761847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 68861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 68961847f8eSopenharmony_ci * @crossplatform 69061847f8eSopenharmony_ci * @form 69161847f8eSopenharmony_ci * @since 10 69261847f8eSopenharmony_ci */ 69361847f8eSopenharmony_ci /** 69461847f8eSopenharmony_ci * Drawing Cubic Bessel Curve Paths 69561847f8eSopenharmony_ci * 69661847f8eSopenharmony_ci * @param { number } cp1x - The x-axis coordinate of the first control point. 69761847f8eSopenharmony_ci * @param { number } cp1y - The y-axis coordinate of the first control point. 69861847f8eSopenharmony_ci * @param { number } cp2x - The x-axis coordinate of the second control point. 69961847f8eSopenharmony_ci * @param { number } cp2y - The y-axis coordinate of the second control point. 70061847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 70161847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 70261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 70361847f8eSopenharmony_ci * @crossplatform 70461847f8eSopenharmony_ci * @form 70561847f8eSopenharmony_ci * @atomicservice 70661847f8eSopenharmony_ci * @since 11 70761847f8eSopenharmony_ci */ 70861847f8eSopenharmony_ci bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; 70961847f8eSopenharmony_ci 71061847f8eSopenharmony_ci /** 71161847f8eSopenharmony_ci * Returns the pen point to the start point of the current sub-path 71261847f8eSopenharmony_ci * 71361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 71461847f8eSopenharmony_ci * @since 8 71561847f8eSopenharmony_ci */ 71661847f8eSopenharmony_ci /** 71761847f8eSopenharmony_ci * Returns the pen point to the start point of the current sub-path 71861847f8eSopenharmony_ci * 71961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 72061847f8eSopenharmony_ci * @form 72161847f8eSopenharmony_ci * @since 9 72261847f8eSopenharmony_ci */ 72361847f8eSopenharmony_ci /** 72461847f8eSopenharmony_ci * Returns the pen point to the start point of the current sub-path 72561847f8eSopenharmony_ci * 72661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 72761847f8eSopenharmony_ci * @crossplatform 72861847f8eSopenharmony_ci * @form 72961847f8eSopenharmony_ci * @since 10 73061847f8eSopenharmony_ci */ 73161847f8eSopenharmony_ci /** 73261847f8eSopenharmony_ci * Returns the pen point to the start point of the current sub-path 73361847f8eSopenharmony_ci * 73461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 73561847f8eSopenharmony_ci * @crossplatform 73661847f8eSopenharmony_ci * @form 73761847f8eSopenharmony_ci * @atomicservice 73861847f8eSopenharmony_ci * @since 11 73961847f8eSopenharmony_ci */ 74061847f8eSopenharmony_ci closePath(): void; 74161847f8eSopenharmony_ci 74261847f8eSopenharmony_ci /** 74361847f8eSopenharmony_ci * Draw an Elliptic Path 74461847f8eSopenharmony_ci * 74561847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the center of the ellipse. 74661847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the center of the ellipse. 74761847f8eSopenharmony_ci * @param { number } radiusX - Radius of the major axis of the ellipse. 74861847f8eSopenharmony_ci * @param { number } radiusY - Radius of the minor axis of the ellipse. 74961847f8eSopenharmony_ci * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees). 75061847f8eSopenharmony_ci * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians 75161847f8eSopenharmony_ci * (not angular degrees). 75261847f8eSopenharmony_ci * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees). 75361847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise, 75461847f8eSopenharmony_ci * the ellipse is drawn clockwise. The default value is false. 75561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 75661847f8eSopenharmony_ci * @since 8 75761847f8eSopenharmony_ci */ 75861847f8eSopenharmony_ci /** 75961847f8eSopenharmony_ci * Draw an Elliptic Path 76061847f8eSopenharmony_ci * 76161847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the center of the ellipse. 76261847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the center of the ellipse. 76361847f8eSopenharmony_ci * @param { number } radiusX - Radius of the major axis of the ellipse. 76461847f8eSopenharmony_ci * @param { number } radiusY - Radius of the minor axis of the ellipse. 76561847f8eSopenharmony_ci * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees). 76661847f8eSopenharmony_ci * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians 76761847f8eSopenharmony_ci * (not angular degrees). 76861847f8eSopenharmony_ci * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees). 76961847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise, 77061847f8eSopenharmony_ci * the ellipse is drawn clockwise. The default value is false. 77161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 77261847f8eSopenharmony_ci * @form 77361847f8eSopenharmony_ci * @since 9 77461847f8eSopenharmony_ci */ 77561847f8eSopenharmony_ci /** 77661847f8eSopenharmony_ci * Draw an Elliptic Path 77761847f8eSopenharmony_ci * 77861847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the center of the ellipse. 77961847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the center of the ellipse. 78061847f8eSopenharmony_ci * @param { number } radiusX - Radius of the major axis of the ellipse. 78161847f8eSopenharmony_ci * @param { number } radiusY - Radius of the minor axis of the ellipse. 78261847f8eSopenharmony_ci * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees). 78361847f8eSopenharmony_ci * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians 78461847f8eSopenharmony_ci * (not angular degrees). 78561847f8eSopenharmony_ci * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees). 78661847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise, 78761847f8eSopenharmony_ci * the ellipse is drawn clockwise. The default value is false. 78861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 78961847f8eSopenharmony_ci * @crossplatform 79061847f8eSopenharmony_ci * @form 79161847f8eSopenharmony_ci * @since 10 79261847f8eSopenharmony_ci */ 79361847f8eSopenharmony_ci /** 79461847f8eSopenharmony_ci * Draw an Elliptic Path 79561847f8eSopenharmony_ci * 79661847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the center of the ellipse. 79761847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the center of the ellipse. 79861847f8eSopenharmony_ci * @param { number } radiusX - Radius of the major axis of the ellipse. 79961847f8eSopenharmony_ci * @param { number } radiusY - Radius of the minor axis of the ellipse. 80061847f8eSopenharmony_ci * @param { number } rotation - The rotation angle of the ellipse, in radians (not angular degrees). 80161847f8eSopenharmony_ci * @param { number } startAngle - The angle of the starting point to be drawn, measured from the x-axis in radians 80261847f8eSopenharmony_ci * (not angular degrees). 80361847f8eSopenharmony_ci * @param { number } endAngle - The angle, in radians, at which the ellipse is to be drawn (not angular degrees). 80461847f8eSopenharmony_ci * @param { boolean } counterclockwise - If the value is true, the ellipse is drawn counterclockwise. Otherwise, 80561847f8eSopenharmony_ci * the ellipse is drawn clockwise. The default value is false. 80661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 80761847f8eSopenharmony_ci * @crossplatform 80861847f8eSopenharmony_ci * @form 80961847f8eSopenharmony_ci * @atomicservice 81061847f8eSopenharmony_ci * @since 11 81161847f8eSopenharmony_ci */ 81261847f8eSopenharmony_ci ellipse( 81361847f8eSopenharmony_ci x: number, 81461847f8eSopenharmony_ci y: number, 81561847f8eSopenharmony_ci radiusX: number, 81661847f8eSopenharmony_ci radiusY: number, 81761847f8eSopenharmony_ci rotation: number, 81861847f8eSopenharmony_ci startAngle: number, 81961847f8eSopenharmony_ci endAngle: number, 82061847f8eSopenharmony_ci counterclockwise?: boolean, 82161847f8eSopenharmony_ci ): void; 82261847f8eSopenharmony_ci 82361847f8eSopenharmony_ci /** 82461847f8eSopenharmony_ci * Connect sub-path using straight lines 82561847f8eSopenharmony_ci * 82661847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the end point of the line. 82761847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the end point of the line. 82861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 82961847f8eSopenharmony_ci * @since 8 83061847f8eSopenharmony_ci */ 83161847f8eSopenharmony_ci /** 83261847f8eSopenharmony_ci * Connect sub-path using straight lines 83361847f8eSopenharmony_ci * 83461847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the end point of the line. 83561847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the end point of the line. 83661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 83761847f8eSopenharmony_ci * @form 83861847f8eSopenharmony_ci * @since 9 83961847f8eSopenharmony_ci */ 84061847f8eSopenharmony_ci /** 84161847f8eSopenharmony_ci * Connect sub-path using straight lines 84261847f8eSopenharmony_ci * 84361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the end point of the line. 84461847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the end point of the line. 84561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 84661847f8eSopenharmony_ci * @crossplatform 84761847f8eSopenharmony_ci * @form 84861847f8eSopenharmony_ci * @since 10 84961847f8eSopenharmony_ci */ 85061847f8eSopenharmony_ci /** 85161847f8eSopenharmony_ci * Connect sub-path using straight lines 85261847f8eSopenharmony_ci * 85361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the end point of the line. 85461847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the end point of the line. 85561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 85661847f8eSopenharmony_ci * @crossplatform 85761847f8eSopenharmony_ci * @form 85861847f8eSopenharmony_ci * @atomicservice 85961847f8eSopenharmony_ci * @since 11 86061847f8eSopenharmony_ci */ 86161847f8eSopenharmony_ci lineTo(x: number, y: number): void; 86261847f8eSopenharmony_ci 86361847f8eSopenharmony_ci /** 86461847f8eSopenharmony_ci * Moves the start point of a new sub-path to the (x, y) coordinate. 86561847f8eSopenharmony_ci * 86661847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the point. 86761847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the point. 86861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 86961847f8eSopenharmony_ci * @since 8 87061847f8eSopenharmony_ci */ 87161847f8eSopenharmony_ci /** 87261847f8eSopenharmony_ci * Moves the start point of a new sub-path to the (x, y) coordinate. 87361847f8eSopenharmony_ci * 87461847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the point. 87561847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the point. 87661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 87761847f8eSopenharmony_ci * @form 87861847f8eSopenharmony_ci * @since 9 87961847f8eSopenharmony_ci */ 88061847f8eSopenharmony_ci /** 88161847f8eSopenharmony_ci * Moves the start point of a new sub-path to the (x, y) coordinate. 88261847f8eSopenharmony_ci * 88361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the point. 88461847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the point. 88561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 88661847f8eSopenharmony_ci * @crossplatform 88761847f8eSopenharmony_ci * @form 88861847f8eSopenharmony_ci * @since 10 88961847f8eSopenharmony_ci */ 89061847f8eSopenharmony_ci /** 89161847f8eSopenharmony_ci * Moves the start point of a new sub-path to the (x, y) coordinate. 89261847f8eSopenharmony_ci * 89361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the point. 89461847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the point. 89561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 89661847f8eSopenharmony_ci * @crossplatform 89761847f8eSopenharmony_ci * @form 89861847f8eSopenharmony_ci * @atomicservice 89961847f8eSopenharmony_ci * @since 11 90061847f8eSopenharmony_ci */ 90161847f8eSopenharmony_ci moveTo(x: number, y: number): void; 90261847f8eSopenharmony_ci 90361847f8eSopenharmony_ci /** 90461847f8eSopenharmony_ci * Draw quadratic Bezier curve paths 90561847f8eSopenharmony_ci * 90661847f8eSopenharmony_ci * @param { number } cpx - The x-axis coordinate of the control point. 90761847f8eSopenharmony_ci * @param { number } cpy - The y-axis coordinate of the control point. 90861847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 90961847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 91061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 91161847f8eSopenharmony_ci * @since 8 91261847f8eSopenharmony_ci */ 91361847f8eSopenharmony_ci /** 91461847f8eSopenharmony_ci * Draw quadratic Bezier curve paths 91561847f8eSopenharmony_ci * 91661847f8eSopenharmony_ci * @param { number } cpx - The x-axis coordinate of the control point. 91761847f8eSopenharmony_ci * @param { number } cpy - The y-axis coordinate of the control point. 91861847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 91961847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 92061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 92161847f8eSopenharmony_ci * @form 92261847f8eSopenharmony_ci * @since 9 92361847f8eSopenharmony_ci */ 92461847f8eSopenharmony_ci /** 92561847f8eSopenharmony_ci * Draw quadratic Bezier curve paths 92661847f8eSopenharmony_ci * 92761847f8eSopenharmony_ci * @param { number } cpx - The x-axis coordinate of the control point. 92861847f8eSopenharmony_ci * @param { number } cpy - The y-axis coordinate of the control point. 92961847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 93061847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 93161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 93261847f8eSopenharmony_ci * @crossplatform 93361847f8eSopenharmony_ci * @form 93461847f8eSopenharmony_ci * @since 10 93561847f8eSopenharmony_ci */ 93661847f8eSopenharmony_ci /** 93761847f8eSopenharmony_ci * Draw quadratic Bezier curve paths 93861847f8eSopenharmony_ci * 93961847f8eSopenharmony_ci * @param { number } cpx - The x-axis coordinate of the control point. 94061847f8eSopenharmony_ci * @param { number } cpy - The y-axis coordinate of the control point. 94161847f8eSopenharmony_ci * @param { number } x - x-axis coordinate of the end point. 94261847f8eSopenharmony_ci * @param { number } y - y-axis coordinate of the end point. 94361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 94461847f8eSopenharmony_ci * @crossplatform 94561847f8eSopenharmony_ci * @form 94661847f8eSopenharmony_ci * @atomicservice 94761847f8eSopenharmony_ci * @since 11 94861847f8eSopenharmony_ci */ 94961847f8eSopenharmony_ci quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; 95061847f8eSopenharmony_ci 95161847f8eSopenharmony_ci /** 95261847f8eSopenharmony_ci * Draw Rectangular Paths 95361847f8eSopenharmony_ci * 95461847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 95561847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 95661847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 95761847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 95861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 95961847f8eSopenharmony_ci * @since 8 96061847f8eSopenharmony_ci */ 96161847f8eSopenharmony_ci /** 96261847f8eSopenharmony_ci * Draw Rectangular Paths 96361847f8eSopenharmony_ci * 96461847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 96561847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 96661847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 96761847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 96861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 96961847f8eSopenharmony_ci * @form 97061847f8eSopenharmony_ci * @since 9 97161847f8eSopenharmony_ci */ 97261847f8eSopenharmony_ci /** 97361847f8eSopenharmony_ci * Draw Rectangular Paths 97461847f8eSopenharmony_ci * 97561847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 97661847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 97761847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 97861847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 97961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 98061847f8eSopenharmony_ci * @crossplatform 98161847f8eSopenharmony_ci * @form 98261847f8eSopenharmony_ci * @since 10 98361847f8eSopenharmony_ci */ 98461847f8eSopenharmony_ci /** 98561847f8eSopenharmony_ci * Draw Rectangular Paths 98661847f8eSopenharmony_ci * 98761847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 98861847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 98961847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 99061847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 99161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 99261847f8eSopenharmony_ci * @crossplatform 99361847f8eSopenharmony_ci * @form 99461847f8eSopenharmony_ci * @atomicservice 99561847f8eSopenharmony_ci * @since 11 99661847f8eSopenharmony_ci */ 99761847f8eSopenharmony_ci rect(x: number, y: number, w: number, h: number): void; 99861847f8eSopenharmony_ci} 99961847f8eSopenharmony_ci 100061847f8eSopenharmony_ci/** 100161847f8eSopenharmony_ci * 2D path object for path drawing 100261847f8eSopenharmony_ci * 100361847f8eSopenharmony_ci * @extends CanvasPath 100461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 100561847f8eSopenharmony_ci * @since 8 100661847f8eSopenharmony_ci */ 100761847f8eSopenharmony_ci/** 100861847f8eSopenharmony_ci * 2D path object for path drawing 100961847f8eSopenharmony_ci * 101061847f8eSopenharmony_ci * @extends CanvasPath 101161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 101261847f8eSopenharmony_ci * @form 101361847f8eSopenharmony_ci * @since 9 101461847f8eSopenharmony_ci */ 101561847f8eSopenharmony_ci/** 101661847f8eSopenharmony_ci * 2D path object for path drawing 101761847f8eSopenharmony_ci * 101861847f8eSopenharmony_ci * @extends CanvasPath 101961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 102061847f8eSopenharmony_ci * @crossplatform 102161847f8eSopenharmony_ci * @form 102261847f8eSopenharmony_ci * @since 10 102361847f8eSopenharmony_ci */ 102461847f8eSopenharmony_ci/** 102561847f8eSopenharmony_ci * 2D path object for path drawing 102661847f8eSopenharmony_ci * 102761847f8eSopenharmony_ci * @extends CanvasPath 102861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 102961847f8eSopenharmony_ci * @crossplatform 103061847f8eSopenharmony_ci * @form 103161847f8eSopenharmony_ci * @atomicservice 103261847f8eSopenharmony_ci * @since 11 103361847f8eSopenharmony_ci */ 103461847f8eSopenharmony_cideclare class Path2D extends CanvasPath { 103561847f8eSopenharmony_ci /** 103661847f8eSopenharmony_ci * Adds a path according to the specified path variable. 103761847f8eSopenharmony_ci * 103861847f8eSopenharmony_ci * @param { Path2D } path - Indicates the path object to be added. 103961847f8eSopenharmony_ci * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null. 104061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 104161847f8eSopenharmony_ci * @since 8 104261847f8eSopenharmony_ci */ 104361847f8eSopenharmony_ci /** 104461847f8eSopenharmony_ci * Adds a path according to the specified path variable. 104561847f8eSopenharmony_ci * 104661847f8eSopenharmony_ci * @param { Path2D } path - Indicates the path object to be added. 104761847f8eSopenharmony_ci * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null. 104861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 104961847f8eSopenharmony_ci * @form 105061847f8eSopenharmony_ci * @since 9 105161847f8eSopenharmony_ci */ 105261847f8eSopenharmony_ci /** 105361847f8eSopenharmony_ci * Adds a path according to the specified path variable. 105461847f8eSopenharmony_ci * 105561847f8eSopenharmony_ci * @param { Path2D } path - Indicates the path object to be added. 105661847f8eSopenharmony_ci * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null. 105761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 105861847f8eSopenharmony_ci * @crossplatform 105961847f8eSopenharmony_ci * @form 106061847f8eSopenharmony_ci * @since 10 106161847f8eSopenharmony_ci */ 106261847f8eSopenharmony_ci /** 106361847f8eSopenharmony_ci * Adds a path according to the specified path variable. 106461847f8eSopenharmony_ci * 106561847f8eSopenharmony_ci * @param { Path2D } path - Indicates the path object to be added. 106661847f8eSopenharmony_ci * @param { Matrix2D } transform - Transformation matrix of the new trail. The default value is null. 106761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 106861847f8eSopenharmony_ci * @crossplatform 106961847f8eSopenharmony_ci * @form 107061847f8eSopenharmony_ci * @atomicservice 107161847f8eSopenharmony_ci * @since 11 107261847f8eSopenharmony_ci */ 107361847f8eSopenharmony_ci addPath(path: Path2D, transform?: Matrix2D): void; 107461847f8eSopenharmony_ci 107561847f8eSopenharmony_ci /** 107661847f8eSopenharmony_ci * Create an empty path object. 107761847f8eSopenharmony_ci * 107861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 107961847f8eSopenharmony_ci * @since 8 108061847f8eSopenharmony_ci */ 108161847f8eSopenharmony_ci /** 108261847f8eSopenharmony_ci * Create an empty path object. 108361847f8eSopenharmony_ci * 108461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 108561847f8eSopenharmony_ci * @form 108661847f8eSopenharmony_ci * @since 9 108761847f8eSopenharmony_ci */ 108861847f8eSopenharmony_ci /** 108961847f8eSopenharmony_ci * Create an empty path object. 109061847f8eSopenharmony_ci * 109161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 109261847f8eSopenharmony_ci * @crossplatform 109361847f8eSopenharmony_ci * @form 109461847f8eSopenharmony_ci * @since 10 109561847f8eSopenharmony_ci */ 109661847f8eSopenharmony_ci /** 109761847f8eSopenharmony_ci * Create an empty path object. 109861847f8eSopenharmony_ci * 109961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 110061847f8eSopenharmony_ci * @crossplatform 110161847f8eSopenharmony_ci * @form 110261847f8eSopenharmony_ci * @atomicservice 110361847f8eSopenharmony_ci * @since 11 110461847f8eSopenharmony_ci */ 110561847f8eSopenharmony_ci constructor(); 110661847f8eSopenharmony_ci 110761847f8eSopenharmony_ci /** 110861847f8eSopenharmony_ci * Create an empty path object. 110961847f8eSopenharmony_ci * 111061847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 111161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 111261847f8eSopenharmony_ci * @crossplatform 111361847f8eSopenharmony_ci * @form 111461847f8eSopenharmony_ci * @atomicservice 111561847f8eSopenharmony_ci * @since 12 111661847f8eSopenharmony_ci */ 111761847f8eSopenharmony_ci constructor(unit: LengthMetricsUnit); 111861847f8eSopenharmony_ci 111961847f8eSopenharmony_ci /** 112061847f8eSopenharmony_ci * Create a copy of a path object 112161847f8eSopenharmony_ci * 112261847f8eSopenharmony_ci * @param { Path2D } path - Path object to be copied 112361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 112461847f8eSopenharmony_ci * @since 8 112561847f8eSopenharmony_ci */ 112661847f8eSopenharmony_ci /** 112761847f8eSopenharmony_ci * Create a copy of a path object 112861847f8eSopenharmony_ci * 112961847f8eSopenharmony_ci * @param { Path2D } path - Path object to be copied 113061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 113161847f8eSopenharmony_ci * @form 113261847f8eSopenharmony_ci * @since 9 113361847f8eSopenharmony_ci */ 113461847f8eSopenharmony_ci /** 113561847f8eSopenharmony_ci * Create a copy of a path object 113661847f8eSopenharmony_ci * 113761847f8eSopenharmony_ci * @param { Path2D } path - Path object to be copied 113861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 113961847f8eSopenharmony_ci * @crossplatform 114061847f8eSopenharmony_ci * @form 114161847f8eSopenharmony_ci * @since 10 114261847f8eSopenharmony_ci */ 114361847f8eSopenharmony_ci /** 114461847f8eSopenharmony_ci * Create a copy of a path object 114561847f8eSopenharmony_ci * 114661847f8eSopenharmony_ci * @param { Path2D } path - Path object to be copied 114761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 114861847f8eSopenharmony_ci * @crossplatform 114961847f8eSopenharmony_ci * @form 115061847f8eSopenharmony_ci * @atomicservice 115161847f8eSopenharmony_ci * @since 11 115261847f8eSopenharmony_ci */ 115361847f8eSopenharmony_ci constructor(path: Path2D); 115461847f8eSopenharmony_ci 115561847f8eSopenharmony_ci /** 115661847f8eSopenharmony_ci * Create a copy of a path object 115761847f8eSopenharmony_ci * 115861847f8eSopenharmony_ci * @param { Path2D } path - Path object to be copied 115961847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 116061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 116161847f8eSopenharmony_ci * @crossplatform 116261847f8eSopenharmony_ci * @form 116361847f8eSopenharmony_ci * @atomicservice 116461847f8eSopenharmony_ci * @since 12 116561847f8eSopenharmony_ci */ 116661847f8eSopenharmony_ci constructor(path: Path2D, unit: LengthMetricsUnit); 116761847f8eSopenharmony_ci 116861847f8eSopenharmony_ci /** 116961847f8eSopenharmony_ci * Create a new path according to the description. 117061847f8eSopenharmony_ci * 117161847f8eSopenharmony_ci * @param { string } d - Indicates the path string that compiles with the SVG path description specifications. 117261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 117361847f8eSopenharmony_ci * @since 8 117461847f8eSopenharmony_ci */ 117561847f8eSopenharmony_ci /** 117661847f8eSopenharmony_ci * Create a new path according to the description. 117761847f8eSopenharmony_ci * 117861847f8eSopenharmony_ci * @param { string } d - Indicates the path string that compiles with the SVG path description specifications. 117961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 118061847f8eSopenharmony_ci * @form 118161847f8eSopenharmony_ci * @since 9 118261847f8eSopenharmony_ci */ 118361847f8eSopenharmony_ci /** 118461847f8eSopenharmony_ci * Create a new path according to the description. 118561847f8eSopenharmony_ci * 118661847f8eSopenharmony_ci * @param { string } d - Indicates the path string that compiles with the SVG path description specifications. 118761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 118861847f8eSopenharmony_ci * @crossplatform 118961847f8eSopenharmony_ci * @form 119061847f8eSopenharmony_ci * @since 10 119161847f8eSopenharmony_ci */ 119261847f8eSopenharmony_ci /** 119361847f8eSopenharmony_ci * Create a new path according to the description. 119461847f8eSopenharmony_ci * 119561847f8eSopenharmony_ci * @param { string } d - Indicates the path string that compiles with the SVG path description specifications. 119661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 119761847f8eSopenharmony_ci * @crossplatform 119861847f8eSopenharmony_ci * @form 119961847f8eSopenharmony_ci * @atomicservice 120061847f8eSopenharmony_ci * @since 11 120161847f8eSopenharmony_ci */ 120261847f8eSopenharmony_ci constructor(d: string); 120361847f8eSopenharmony_ci 120461847f8eSopenharmony_ci /** 120561847f8eSopenharmony_ci * Create a new path according to the description. 120661847f8eSopenharmony_ci * 120761847f8eSopenharmony_ci * @param { string } description - Indicates the path string that compiles with the SVG path description specifications. 120861847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 120961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 121061847f8eSopenharmony_ci * @crossplatform 121161847f8eSopenharmony_ci * @form 121261847f8eSopenharmony_ci * @atomicservice 121361847f8eSopenharmony_ci * @since 12 121461847f8eSopenharmony_ci */ 121561847f8eSopenharmony_ci constructor(description: string, unit: LengthMetricsUnit); 121661847f8eSopenharmony_ci} 121761847f8eSopenharmony_ci 121861847f8eSopenharmony_ci/** 121961847f8eSopenharmony_ci * Describes an opaque object of a template, which is created using the createPattern() method. 122061847f8eSopenharmony_ci * 122161847f8eSopenharmony_ci * @interface CanvasPattern 122261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 122361847f8eSopenharmony_ci * @since 8 122461847f8eSopenharmony_ci */ 122561847f8eSopenharmony_ci/** 122661847f8eSopenharmony_ci * Describes an opaque object of a template, which is created using the createPattern() method. 122761847f8eSopenharmony_ci * 122861847f8eSopenharmony_ci * @interface CanvasPattern 122961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 123061847f8eSopenharmony_ci * @form 123161847f8eSopenharmony_ci * @since 9 123261847f8eSopenharmony_ci */ 123361847f8eSopenharmony_ci/** 123461847f8eSopenharmony_ci * Describes an opaque object of a template, which is created using the createPattern() method. 123561847f8eSopenharmony_ci * 123661847f8eSopenharmony_ci * @interface CanvasPattern 123761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 123861847f8eSopenharmony_ci * @crossplatform 123961847f8eSopenharmony_ci * @form 124061847f8eSopenharmony_ci * @since 10 124161847f8eSopenharmony_ci */ 124261847f8eSopenharmony_ci/** 124361847f8eSopenharmony_ci * Describes an opaque object of a template, which is created using the createPattern() method. 124461847f8eSopenharmony_ci * 124561847f8eSopenharmony_ci * @interface CanvasPattern 124661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 124761847f8eSopenharmony_ci * @crossplatform 124861847f8eSopenharmony_ci * @form 124961847f8eSopenharmony_ci * @atomicservice 125061847f8eSopenharmony_ci * @since 11 125161847f8eSopenharmony_ci */ 125261847f8eSopenharmony_cideclare interface CanvasPattern { 125361847f8eSopenharmony_ci /** 125461847f8eSopenharmony_ci * Adds the matrix transformation effect to the current template. 125561847f8eSopenharmony_ci * 125661847f8eSopenharmony_ci * @param { Matrix2D } transform - transformation matrix. The default value is null. 125761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 125861847f8eSopenharmony_ci * @since 8 125961847f8eSopenharmony_ci */ 126061847f8eSopenharmony_ci /** 126161847f8eSopenharmony_ci * Adds the matrix transformation effect to the current template. 126261847f8eSopenharmony_ci * 126361847f8eSopenharmony_ci * @param { Matrix2D } transform - transformation matrix. The default value is null. 126461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 126561847f8eSopenharmony_ci * @form 126661847f8eSopenharmony_ci * @since 9 126761847f8eSopenharmony_ci */ 126861847f8eSopenharmony_ci /** 126961847f8eSopenharmony_ci * Adds the matrix transformation effect to the current template. 127061847f8eSopenharmony_ci * 127161847f8eSopenharmony_ci * @param { Matrix2D } transform - transformation matrix. The default value is null. 127261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 127361847f8eSopenharmony_ci * @crossplatform 127461847f8eSopenharmony_ci * @form 127561847f8eSopenharmony_ci * @since 10 127661847f8eSopenharmony_ci */ 127761847f8eSopenharmony_ci /** 127861847f8eSopenharmony_ci * Adds the matrix transformation effect to the current template. 127961847f8eSopenharmony_ci * 128061847f8eSopenharmony_ci * @param { Matrix2D } transform - transformation matrix. The default value is null. 128161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 128261847f8eSopenharmony_ci * @crossplatform 128361847f8eSopenharmony_ci * @form 128461847f8eSopenharmony_ci * @atomicservice 128561847f8eSopenharmony_ci * @since 11 128661847f8eSopenharmony_ci */ 128761847f8eSopenharmony_ci setTransform(transform?: Matrix2D): void; 128861847f8eSopenharmony_ci} 128961847f8eSopenharmony_ci 129061847f8eSopenharmony_ci/** 129161847f8eSopenharmony_ci * Size information of the text 129261847f8eSopenharmony_ci * 129361847f8eSopenharmony_ci * @interface TextMetrics 129461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 129561847f8eSopenharmony_ci * @since 8 129661847f8eSopenharmony_ci */ 129761847f8eSopenharmony_ci/** 129861847f8eSopenharmony_ci * Size information of the text 129961847f8eSopenharmony_ci * 130061847f8eSopenharmony_ci * @interface TextMetrics 130161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 130261847f8eSopenharmony_ci * @form 130361847f8eSopenharmony_ci * @since 9 130461847f8eSopenharmony_ci */ 130561847f8eSopenharmony_ci/** 130661847f8eSopenharmony_ci * Size information of the text 130761847f8eSopenharmony_ci * 130861847f8eSopenharmony_ci * @interface TextMetrics 130961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 131061847f8eSopenharmony_ci * @crossplatform 131161847f8eSopenharmony_ci * @form 131261847f8eSopenharmony_ci * @since 10 131361847f8eSopenharmony_ci */ 131461847f8eSopenharmony_ci/** 131561847f8eSopenharmony_ci * Size information of the text 131661847f8eSopenharmony_ci * 131761847f8eSopenharmony_ci * @interface TextMetrics 131861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 131961847f8eSopenharmony_ci * @crossplatform 132061847f8eSopenharmony_ci * @form 132161847f8eSopenharmony_ci * @atomicservice 132261847f8eSopenharmony_ci * @since 11 132361847f8eSopenharmony_ci */ 132461847f8eSopenharmony_cideclare interface TextMetrics { 132561847f8eSopenharmony_ci /** 132661847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of 132761847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 132861847f8eSopenharmony_ci * 132961847f8eSopenharmony_ci * @type { number } 133061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 133161847f8eSopenharmony_ci * @since 8 133261847f8eSopenharmony_ci */ 133361847f8eSopenharmony_ci /** 133461847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of 133561847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 133661847f8eSopenharmony_ci * 133761847f8eSopenharmony_ci * @type { number } 133861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 133961847f8eSopenharmony_ci * @form 134061847f8eSopenharmony_ci * @since 9 134161847f8eSopenharmony_ci */ 134261847f8eSopenharmony_ci /** 134361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of 134461847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 134561847f8eSopenharmony_ci * 134661847f8eSopenharmony_ci * @type { number } 134761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 134861847f8eSopenharmony_ci * @crossplatform 134961847f8eSopenharmony_ci * @form 135061847f8eSopenharmony_ci * @since 10 135161847f8eSopenharmony_ci */ 135261847f8eSopenharmony_ci /** 135361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of 135461847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 135561847f8eSopenharmony_ci * 135661847f8eSopenharmony_ci * @type { number } 135761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 135861847f8eSopenharmony_ci * @crossplatform 135961847f8eSopenharmony_ci * @form 136061847f8eSopenharmony_ci * @atomicservice 136161847f8eSopenharmony_ci * @since 11 136261847f8eSopenharmony_ci */ 136361847f8eSopenharmony_ci readonly actualBoundingBoxAscent: number; 136461847f8eSopenharmony_ci 136561847f8eSopenharmony_ci /** 136661847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of 136761847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 136861847f8eSopenharmony_ci * 136961847f8eSopenharmony_ci * @type { number } 137061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 137161847f8eSopenharmony_ci * @since 8 137261847f8eSopenharmony_ci */ 137361847f8eSopenharmony_ci /** 137461847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of 137561847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 137661847f8eSopenharmony_ci * 137761847f8eSopenharmony_ci * @type { number } 137861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 137961847f8eSopenharmony_ci * @form 138061847f8eSopenharmony_ci * @since 9 138161847f8eSopenharmony_ci */ 138261847f8eSopenharmony_ci /** 138361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of 138461847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 138561847f8eSopenharmony_ci * 138661847f8eSopenharmony_ci * @type { number } 138761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 138861847f8eSopenharmony_ci * @crossplatform 138961847f8eSopenharmony_ci * @form 139061847f8eSopenharmony_ci * @since 10 139161847f8eSopenharmony_ci */ 139261847f8eSopenharmony_ci /** 139361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the bottom of 139461847f8eSopenharmony_ci * the rectangular boundary of the rendered text. 139561847f8eSopenharmony_ci * 139661847f8eSopenharmony_ci * @type { number } 139761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 139861847f8eSopenharmony_ci * @crossplatform 139961847f8eSopenharmony_ci * @form 140061847f8eSopenharmony_ci * @atomicservice 140161847f8eSopenharmony_ci * @since 11 140261847f8eSopenharmony_ci */ 140361847f8eSopenharmony_ci readonly actualBoundingBoxDescent: number; 140461847f8eSopenharmony_ci 140561847f8eSopenharmony_ci /** 140661847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 140761847f8eSopenharmony_ci * the left of the text rectangle boundary. 140861847f8eSopenharmony_ci * 140961847f8eSopenharmony_ci * @type { number } 141061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 141161847f8eSopenharmony_ci * @since 8 141261847f8eSopenharmony_ci */ 141361847f8eSopenharmony_ci /** 141461847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 141561847f8eSopenharmony_ci * the left of the text rectangle boundary. 141661847f8eSopenharmony_ci * 141761847f8eSopenharmony_ci * @type { number } 141861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 141961847f8eSopenharmony_ci * @form 142061847f8eSopenharmony_ci * @since 9 142161847f8eSopenharmony_ci */ 142261847f8eSopenharmony_ci /** 142361847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 142461847f8eSopenharmony_ci * the left of the text rectangle boundary. 142561847f8eSopenharmony_ci * 142661847f8eSopenharmony_ci * @type { number } 142761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 142861847f8eSopenharmony_ci * @crossplatform 142961847f8eSopenharmony_ci * @form 143061847f8eSopenharmony_ci * @since 10 143161847f8eSopenharmony_ci */ 143261847f8eSopenharmony_ci /** 143361847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 143461847f8eSopenharmony_ci * the left of the text rectangle boundary. 143561847f8eSopenharmony_ci * 143661847f8eSopenharmony_ci * @type { number } 143761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 143861847f8eSopenharmony_ci * @crossplatform 143961847f8eSopenharmony_ci * @form 144061847f8eSopenharmony_ci * @atomicservice 144161847f8eSopenharmony_ci * @since 11 144261847f8eSopenharmony_ci */ 144361847f8eSopenharmony_ci readonly actualBoundingBoxLeft: number; 144461847f8eSopenharmony_ci 144561847f8eSopenharmony_ci /** 144661847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 144761847f8eSopenharmony_ci * the right of the text rectangle boundary. 144861847f8eSopenharmony_ci * 144961847f8eSopenharmony_ci * @type { number } 145061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 145161847f8eSopenharmony_ci * @since 8 145261847f8eSopenharmony_ci */ 145361847f8eSopenharmony_ci /** 145461847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 145561847f8eSopenharmony_ci * the right of the text rectangle boundary. 145661847f8eSopenharmony_ci * 145761847f8eSopenharmony_ci * @type { number } 145861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 145961847f8eSopenharmony_ci * @form 146061847f8eSopenharmony_ci * @since 9 146161847f8eSopenharmony_ci */ 146261847f8eSopenharmony_ci /** 146361847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 146461847f8eSopenharmony_ci * the right of the text rectangle boundary. 146561847f8eSopenharmony_ci * 146661847f8eSopenharmony_ci * @type { number } 146761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 146861847f8eSopenharmony_ci * @crossplatform 146961847f8eSopenharmony_ci * @form 147061847f8eSopenharmony_ci * @since 10 147161847f8eSopenharmony_ci */ 147261847f8eSopenharmony_ci /** 147361847f8eSopenharmony_ci * Double, parallel to the baseline, distance from the alignment point determined by the textAlign property to 147461847f8eSopenharmony_ci * the right of the text rectangle boundary. 147561847f8eSopenharmony_ci * 147661847f8eSopenharmony_ci * @type { number } 147761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 147861847f8eSopenharmony_ci * @crossplatform 147961847f8eSopenharmony_ci * @form 148061847f8eSopenharmony_ci * @atomicservice 148161847f8eSopenharmony_ci * @since 11 148261847f8eSopenharmony_ci */ 148361847f8eSopenharmony_ci readonly actualBoundingBoxRight: number; 148461847f8eSopenharmony_ci 148561847f8eSopenharmony_ci /** 148661847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of 148761847f8eSopenharmony_ci * the wireframe. 148861847f8eSopenharmony_ci * 148961847f8eSopenharmony_ci * @type { number } 149061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 149161847f8eSopenharmony_ci * @since 8 149261847f8eSopenharmony_ci */ 149361847f8eSopenharmony_ci /** 149461847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of 149561847f8eSopenharmony_ci * the wireframe. 149661847f8eSopenharmony_ci * 149761847f8eSopenharmony_ci * @type { number } 149861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 149961847f8eSopenharmony_ci * @form 150061847f8eSopenharmony_ci * @since 9 150161847f8eSopenharmony_ci */ 150261847f8eSopenharmony_ci /** 150361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of 150461847f8eSopenharmony_ci * the wireframe. 150561847f8eSopenharmony_ci * 150661847f8eSopenharmony_ci * @type { number } 150761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 150861847f8eSopenharmony_ci * @crossplatform 150961847f8eSopenharmony_ci * @form 151061847f8eSopenharmony_ci * @since 10 151161847f8eSopenharmony_ci */ 151261847f8eSopenharmony_ci /** 151361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the alphabetic baseline of 151461847f8eSopenharmony_ci * the wireframe. 151561847f8eSopenharmony_ci * 151661847f8eSopenharmony_ci * @type { number } 151761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 151861847f8eSopenharmony_ci * @crossplatform 151961847f8eSopenharmony_ci * @form 152061847f8eSopenharmony_ci * @atomicservice 152161847f8eSopenharmony_ci * @since 11 152261847f8eSopenharmony_ci */ 152361847f8eSopenharmony_ci readonly alphabeticBaseline: number; 152461847f8eSopenharmony_ci 152561847f8eSopenharmony_ci /** 152661847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the 152761847f8eSopenharmony_ci * em square in the wireframe. 152861847f8eSopenharmony_ci * 152961847f8eSopenharmony_ci * @type { number } 153061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 153161847f8eSopenharmony_ci * @since 8 153261847f8eSopenharmony_ci */ 153361847f8eSopenharmony_ci /** 153461847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the 153561847f8eSopenharmony_ci * em square in the wireframe. 153661847f8eSopenharmony_ci * 153761847f8eSopenharmony_ci * @type { number } 153861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 153961847f8eSopenharmony_ci * @form 154061847f8eSopenharmony_ci * @since 9 154161847f8eSopenharmony_ci */ 154261847f8eSopenharmony_ci /** 154361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the 154461847f8eSopenharmony_ci * em square in the wireframe. 154561847f8eSopenharmony_ci * 154661847f8eSopenharmony_ci * @type { number } 154761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 154861847f8eSopenharmony_ci * @crossplatform 154961847f8eSopenharmony_ci * @form 155061847f8eSopenharmony_ci * @since 10 155161847f8eSopenharmony_ci */ 155261847f8eSopenharmony_ci /** 155361847f8eSopenharmony_ci * Double, the distance from the horizontal line indicated by the textBaseline property to the top of the 155461847f8eSopenharmony_ci * em square in the wireframe. 155561847f8eSopenharmony_ci * 155661847f8eSopenharmony_ci * @type { number } 155761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 155861847f8eSopenharmony_ci * @crossplatform 155961847f8eSopenharmony_ci * @form 156061847f8eSopenharmony_ci * @atomicservice 156161847f8eSopenharmony_ci * @since 11 156261847f8eSopenharmony_ci */ 156361847f8eSopenharmony_ci readonly emHeightAscent: number; 156461847f8eSopenharmony_ci 156561847f8eSopenharmony_ci /** 156661847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 156761847f8eSopenharmony_ci * em box in the wireframe. 156861847f8eSopenharmony_ci * 156961847f8eSopenharmony_ci * @type { number } 157061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 157161847f8eSopenharmony_ci * @since 8 157261847f8eSopenharmony_ci */ 157361847f8eSopenharmony_ci /** 157461847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 157561847f8eSopenharmony_ci * em box in the wireframe. 157661847f8eSopenharmony_ci * 157761847f8eSopenharmony_ci * @type { number } 157861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 157961847f8eSopenharmony_ci * @form 158061847f8eSopenharmony_ci * @since 9 158161847f8eSopenharmony_ci */ 158261847f8eSopenharmony_ci /** 158361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 158461847f8eSopenharmony_ci * em box in the wireframe. 158561847f8eSopenharmony_ci * 158661847f8eSopenharmony_ci * @type { number } 158761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 158861847f8eSopenharmony_ci * @crossplatform 158961847f8eSopenharmony_ci * @form 159061847f8eSopenharmony_ci * @since 10 159161847f8eSopenharmony_ci */ 159261847f8eSopenharmony_ci /** 159361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 159461847f8eSopenharmony_ci * em box in the wireframe. 159561847f8eSopenharmony_ci * 159661847f8eSopenharmony_ci * @type { number } 159761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 159861847f8eSopenharmony_ci * @crossplatform 159961847f8eSopenharmony_ci * @form 160061847f8eSopenharmony_ci * @atomicservice 160161847f8eSopenharmony_ci * @since 11 160261847f8eSopenharmony_ci */ 160361847f8eSopenharmony_ci readonly emHeightDescent: number; 160461847f8eSopenharmony_ci 160561847f8eSopenharmony_ci /** 160661847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the top of the 160761847f8eSopenharmony_ci * highest rectangle boundary of all fonts rendering text. 160861847f8eSopenharmony_ci * 160961847f8eSopenharmony_ci * @type { number } 161061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 161161847f8eSopenharmony_ci * @since 8 161261847f8eSopenharmony_ci */ 161361847f8eSopenharmony_ci /** 161461847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the top of the 161561847f8eSopenharmony_ci * highest rectangle boundary of all fonts rendering text. 161661847f8eSopenharmony_ci * 161761847f8eSopenharmony_ci * @type { number } 161861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 161961847f8eSopenharmony_ci * @form 162061847f8eSopenharmony_ci * @since 9 162161847f8eSopenharmony_ci */ 162261847f8eSopenharmony_ci /** 162361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the top of the 162461847f8eSopenharmony_ci * highest rectangle boundary of all fonts rendering text. 162561847f8eSopenharmony_ci * 162661847f8eSopenharmony_ci * @type { number } 162761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 162861847f8eSopenharmony_ci * @crossplatform 162961847f8eSopenharmony_ci * @form 163061847f8eSopenharmony_ci * @since 10 163161847f8eSopenharmony_ci */ 163261847f8eSopenharmony_ci /** 163361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the top of the 163461847f8eSopenharmony_ci * highest rectangle boundary of all fonts rendering text. 163561847f8eSopenharmony_ci * 163661847f8eSopenharmony_ci * @type { number } 163761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 163861847f8eSopenharmony_ci * @crossplatform 163961847f8eSopenharmony_ci * @form 164061847f8eSopenharmony_ci * @atomicservice 164161847f8eSopenharmony_ci * @since 11 164261847f8eSopenharmony_ci */ 164361847f8eSopenharmony_ci readonly fontBoundingBoxAscent: number; 164461847f8eSopenharmony_ci 164561847f8eSopenharmony_ci /** 164661847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 164761847f8eSopenharmony_ci * rectangular boundary of all fonts rendering text. 164861847f8eSopenharmony_ci * 164961847f8eSopenharmony_ci * @type { number } 165061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 165161847f8eSopenharmony_ci * @since 8 165261847f8eSopenharmony_ci */ 165361847f8eSopenharmony_ci /** 165461847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 165561847f8eSopenharmony_ci * rectangular boundary of all fonts rendering text. 165661847f8eSopenharmony_ci * 165761847f8eSopenharmony_ci * @type { number } 165861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 165961847f8eSopenharmony_ci * @form 166061847f8eSopenharmony_ci * @since 9 166161847f8eSopenharmony_ci */ 166261847f8eSopenharmony_ci /** 166361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 166461847f8eSopenharmony_ci * rectangular boundary of all fonts rendering text. 166561847f8eSopenharmony_ci * 166661847f8eSopenharmony_ci * @type { number } 166761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 166861847f8eSopenharmony_ci * @crossplatform 166961847f8eSopenharmony_ci * @form 167061847f8eSopenharmony_ci * @since 10 167161847f8eSopenharmony_ci */ 167261847f8eSopenharmony_ci /** 167361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to the bottom of the 167461847f8eSopenharmony_ci * rectangular boundary of all fonts rendering text. 167561847f8eSopenharmony_ci * 167661847f8eSopenharmony_ci * @type { number } 167761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 167861847f8eSopenharmony_ci * @crossplatform 167961847f8eSopenharmony_ci * @form 168061847f8eSopenharmony_ci * @atomicservice 168161847f8eSopenharmony_ci * @since 11 168261847f8eSopenharmony_ci */ 168361847f8eSopenharmony_ci readonly fontBoundingBoxDescent: number; 168461847f8eSopenharmony_ci 168561847f8eSopenharmony_ci /** 168661847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 168761847f8eSopenharmony_ci * the hanging baseline of the wireframe. 168861847f8eSopenharmony_ci * 168961847f8eSopenharmony_ci * @type { number } 169061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 169161847f8eSopenharmony_ci * @since 8 169261847f8eSopenharmony_ci */ 169361847f8eSopenharmony_ci /** 169461847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 169561847f8eSopenharmony_ci * the hanging baseline of the wireframe. 169661847f8eSopenharmony_ci * 169761847f8eSopenharmony_ci * @type { number } 169861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 169961847f8eSopenharmony_ci * @form 170061847f8eSopenharmony_ci * @since 9 170161847f8eSopenharmony_ci */ 170261847f8eSopenharmony_ci /** 170361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 170461847f8eSopenharmony_ci * the hanging baseline of the wireframe. 170561847f8eSopenharmony_ci * 170661847f8eSopenharmony_ci * @type { number } 170761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 170861847f8eSopenharmony_ci * @crossplatform 170961847f8eSopenharmony_ci * @form 171061847f8eSopenharmony_ci * @since 10 171161847f8eSopenharmony_ci */ 171261847f8eSopenharmony_ci /** 171361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 171461847f8eSopenharmony_ci * the hanging baseline of the wireframe. 171561847f8eSopenharmony_ci * 171661847f8eSopenharmony_ci * @type { number } 171761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 171861847f8eSopenharmony_ci * @crossplatform 171961847f8eSopenharmony_ci * @form 172061847f8eSopenharmony_ci * @atomicservice 172161847f8eSopenharmony_ci * @since 11 172261847f8eSopenharmony_ci */ 172361847f8eSopenharmony_ci readonly hangingBaseline: number; 172461847f8eSopenharmony_ci 172561847f8eSopenharmony_ci /** 172661847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 172761847f8eSopenharmony_ci * the ideographic baseline of the wireframe. 172861847f8eSopenharmony_ci * 172961847f8eSopenharmony_ci * @type { number } 173061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 173161847f8eSopenharmony_ci * @since 8 173261847f8eSopenharmony_ci */ 173361847f8eSopenharmony_ci /** 173461847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 173561847f8eSopenharmony_ci * the ideographic baseline of the wireframe. 173661847f8eSopenharmony_ci * 173761847f8eSopenharmony_ci * @type { number } 173861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 173961847f8eSopenharmony_ci * @form 174061847f8eSopenharmony_ci * @since 9 174161847f8eSopenharmony_ci */ 174261847f8eSopenharmony_ci /** 174361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 174461847f8eSopenharmony_ci * the ideographic baseline of the wireframe. 174561847f8eSopenharmony_ci * 174661847f8eSopenharmony_ci * @type { number } 174761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 174861847f8eSopenharmony_ci * @crossplatform 174961847f8eSopenharmony_ci * @form 175061847f8eSopenharmony_ci * @since 10 175161847f8eSopenharmony_ci */ 175261847f8eSopenharmony_ci /** 175361847f8eSopenharmony_ci * Double, distance from the horizontal line indicated by the textBaseline property to 175461847f8eSopenharmony_ci * the ideographic baseline of the wireframe. 175561847f8eSopenharmony_ci * 175661847f8eSopenharmony_ci * @type { number } 175761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 175861847f8eSopenharmony_ci * @crossplatform 175961847f8eSopenharmony_ci * @form 176061847f8eSopenharmony_ci * @atomicservice 176161847f8eSopenharmony_ci * @since 11 176261847f8eSopenharmony_ci */ 176361847f8eSopenharmony_ci readonly ideographicBaseline: number; 176461847f8eSopenharmony_ci 176561847f8eSopenharmony_ci /** 176661847f8eSopenharmony_ci * Indicates the width of a character string. The value is of the double type. 176761847f8eSopenharmony_ci * 176861847f8eSopenharmony_ci * @type { number } 176961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 177061847f8eSopenharmony_ci * @since 8 177161847f8eSopenharmony_ci */ 177261847f8eSopenharmony_ci /** 177361847f8eSopenharmony_ci * Indicates the width of a character string. The value is of the double type. 177461847f8eSopenharmony_ci * 177561847f8eSopenharmony_ci * @type { number } 177661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 177761847f8eSopenharmony_ci * @form 177861847f8eSopenharmony_ci * @since 9 177961847f8eSopenharmony_ci */ 178061847f8eSopenharmony_ci /** 178161847f8eSopenharmony_ci * Indicates the width of a character string. The value is of the double type. 178261847f8eSopenharmony_ci * 178361847f8eSopenharmony_ci * @type { number } 178461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 178561847f8eSopenharmony_ci * @crossplatform 178661847f8eSopenharmony_ci * @form 178761847f8eSopenharmony_ci * @since 10 178861847f8eSopenharmony_ci */ 178961847f8eSopenharmony_ci /** 179061847f8eSopenharmony_ci * Indicates the width of a character string. The value is of the double type. 179161847f8eSopenharmony_ci * 179261847f8eSopenharmony_ci * @type { number } 179361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 179461847f8eSopenharmony_ci * @crossplatform 179561847f8eSopenharmony_ci * @form 179661847f8eSopenharmony_ci * @atomicservice 179761847f8eSopenharmony_ci * @since 11 179861847f8eSopenharmony_ci */ 179961847f8eSopenharmony_ci readonly width: number; 180061847f8eSopenharmony_ci 180161847f8eSopenharmony_ci /** 180261847f8eSopenharmony_ci * Indicates the height of a character string. The value is of the double type. 180361847f8eSopenharmony_ci * 180461847f8eSopenharmony_ci * @type { number } 180561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 180661847f8eSopenharmony_ci * @since 8 180761847f8eSopenharmony_ci */ 180861847f8eSopenharmony_ci /** 180961847f8eSopenharmony_ci * Indicates the height of a character string. The value is of the double type. 181061847f8eSopenharmony_ci * 181161847f8eSopenharmony_ci * @type { number } 181261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 181361847f8eSopenharmony_ci * @form 181461847f8eSopenharmony_ci * @since 9 181561847f8eSopenharmony_ci */ 181661847f8eSopenharmony_ci /** 181761847f8eSopenharmony_ci * Indicates the height of a character string. The value is of the double type. 181861847f8eSopenharmony_ci * 181961847f8eSopenharmony_ci * @type { number } 182061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 182161847f8eSopenharmony_ci * @crossplatform 182261847f8eSopenharmony_ci * @form 182361847f8eSopenharmony_ci * @since 10 182461847f8eSopenharmony_ci */ 182561847f8eSopenharmony_ci /** 182661847f8eSopenharmony_ci * Indicates the height of a character string. The value is of the double type. 182761847f8eSopenharmony_ci * 182861847f8eSopenharmony_ci * @type { number } 182961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 183061847f8eSopenharmony_ci * @crossplatform 183161847f8eSopenharmony_ci * @form 183261847f8eSopenharmony_ci * @atomicservice 183361847f8eSopenharmony_ci * @since 11 183461847f8eSopenharmony_ci */ 183561847f8eSopenharmony_ci readonly height: number; 183661847f8eSopenharmony_ci} 183761847f8eSopenharmony_ci 183861847f8eSopenharmony_ci/** 183961847f8eSopenharmony_ci * Bitmap image object that can be drawn onto the current Canvas 184061847f8eSopenharmony_ci * 184161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 184261847f8eSopenharmony_ci * @since 8 184361847f8eSopenharmony_ci */ 184461847f8eSopenharmony_ci/** 184561847f8eSopenharmony_ci * Bitmap image object that can be drawn onto the current Canvas 184661847f8eSopenharmony_ci * 184761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 184861847f8eSopenharmony_ci * @form 184961847f8eSopenharmony_ci * @since 9 185061847f8eSopenharmony_ci */ 185161847f8eSopenharmony_ci/** 185261847f8eSopenharmony_ci * Bitmap image object that can be drawn onto the current Canvas 185361847f8eSopenharmony_ci * 185461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 185561847f8eSopenharmony_ci * @crossplatform 185661847f8eSopenharmony_ci * @form 185761847f8eSopenharmony_ci * @since 10 185861847f8eSopenharmony_ci */ 185961847f8eSopenharmony_ci/** 186061847f8eSopenharmony_ci * Bitmap image object that can be drawn onto the current Canvas 186161847f8eSopenharmony_ci * 186261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 186361847f8eSopenharmony_ci * @crossplatform 186461847f8eSopenharmony_ci * @form 186561847f8eSopenharmony_ci * @atomicservice 186661847f8eSopenharmony_ci * @since 11 186761847f8eSopenharmony_ci */ 186861847f8eSopenharmony_cideclare class ImageBitmap { 186961847f8eSopenharmony_ci /** 187061847f8eSopenharmony_ci * Indicates the height of the CSS pixel unit of ImageData. 187161847f8eSopenharmony_ci * 187261847f8eSopenharmony_ci * @type { number } 187361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 187461847f8eSopenharmony_ci * @since 8 187561847f8eSopenharmony_ci */ 187661847f8eSopenharmony_ci /** 187761847f8eSopenharmony_ci * Indicates the height of the CSS pixel unit of ImageData. 187861847f8eSopenharmony_ci * 187961847f8eSopenharmony_ci * @type { number } 188061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 188161847f8eSopenharmony_ci * @form 188261847f8eSopenharmony_ci * @since 9 188361847f8eSopenharmony_ci */ 188461847f8eSopenharmony_ci /** 188561847f8eSopenharmony_ci * Indicates the height of the CSS pixel unit of ImageData. 188661847f8eSopenharmony_ci * 188761847f8eSopenharmony_ci * @type { number } 188861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 188961847f8eSopenharmony_ci * @crossplatform 189061847f8eSopenharmony_ci * @form 189161847f8eSopenharmony_ci * @since 10 189261847f8eSopenharmony_ci */ 189361847f8eSopenharmony_ci /** 189461847f8eSopenharmony_ci * Indicates the height of the CSS pixel unit of ImageData. 189561847f8eSopenharmony_ci * 189661847f8eSopenharmony_ci * @type { number } 189761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 189861847f8eSopenharmony_ci * @crossplatform 189961847f8eSopenharmony_ci * @form 190061847f8eSopenharmony_ci * @atomicservice 190161847f8eSopenharmony_ci * @since 11 190261847f8eSopenharmony_ci */ 190361847f8eSopenharmony_ci readonly height: number; 190461847f8eSopenharmony_ci 190561847f8eSopenharmony_ci /** 190661847f8eSopenharmony_ci * Indicates the width of the CSS pixel unit of ImageData. 190761847f8eSopenharmony_ci * 190861847f8eSopenharmony_ci * @type { number } 190961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 191061847f8eSopenharmony_ci * @since 8 191161847f8eSopenharmony_ci */ 191261847f8eSopenharmony_ci /** 191361847f8eSopenharmony_ci * Indicates the width of the CSS pixel unit of ImageData. 191461847f8eSopenharmony_ci * 191561847f8eSopenharmony_ci * @type { number } 191661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 191761847f8eSopenharmony_ci * @form 191861847f8eSopenharmony_ci * @since 9 191961847f8eSopenharmony_ci */ 192061847f8eSopenharmony_ci /** 192161847f8eSopenharmony_ci * Indicates the width of the CSS pixel unit of ImageData. 192261847f8eSopenharmony_ci * 192361847f8eSopenharmony_ci * @type { number } 192461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 192561847f8eSopenharmony_ci * @crossplatform 192661847f8eSopenharmony_ci * @form 192761847f8eSopenharmony_ci * @since 10 192861847f8eSopenharmony_ci */ 192961847f8eSopenharmony_ci /** 193061847f8eSopenharmony_ci * Indicates the width of the CSS pixel unit of ImageData. 193161847f8eSopenharmony_ci * 193261847f8eSopenharmony_ci * @type { number } 193361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 193461847f8eSopenharmony_ci * @crossplatform 193561847f8eSopenharmony_ci * @form 193661847f8eSopenharmony_ci * @atomicservice 193761847f8eSopenharmony_ci * @since 11 193861847f8eSopenharmony_ci */ 193961847f8eSopenharmony_ci readonly width: number; 194061847f8eSopenharmony_ci 194161847f8eSopenharmony_ci /** 194261847f8eSopenharmony_ci * Releases all graphics resources associated with an ImageBitmap. 194361847f8eSopenharmony_ci * 194461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 194561847f8eSopenharmony_ci * @since 8 194661847f8eSopenharmony_ci */ 194761847f8eSopenharmony_ci /** 194861847f8eSopenharmony_ci * Releases all graphics resources associated with an ImageBitmap. 194961847f8eSopenharmony_ci * 195061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 195161847f8eSopenharmony_ci * @form 195261847f8eSopenharmony_ci * @since 9 195361847f8eSopenharmony_ci */ 195461847f8eSopenharmony_ci /** 195561847f8eSopenharmony_ci * Releases all graphics resources associated with an ImageBitmap. 195661847f8eSopenharmony_ci * 195761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 195861847f8eSopenharmony_ci * @crossplatform 195961847f8eSopenharmony_ci * @form 196061847f8eSopenharmony_ci * @since 10 196161847f8eSopenharmony_ci */ 196261847f8eSopenharmony_ci /** 196361847f8eSopenharmony_ci * Releases all graphics resources associated with an ImageBitmap. 196461847f8eSopenharmony_ci * 196561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 196661847f8eSopenharmony_ci * @crossplatform 196761847f8eSopenharmony_ci * @form 196861847f8eSopenharmony_ci * @atomicservice 196961847f8eSopenharmony_ci * @since 11 197061847f8eSopenharmony_ci */ 197161847f8eSopenharmony_ci close(): void; 197261847f8eSopenharmony_ci 197361847f8eSopenharmony_ci /** 197461847f8eSopenharmony_ci * Create an ImageBitmap object based on the transferred image path. 197561847f8eSopenharmony_ci * 197661847f8eSopenharmony_ci * @param { string } src - Path of the image object. 197761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 197861847f8eSopenharmony_ci * @since 8 197961847f8eSopenharmony_ci */ 198061847f8eSopenharmony_ci /** 198161847f8eSopenharmony_ci * Create an ImageBitmap object based on the transferred image path. 198261847f8eSopenharmony_ci * 198361847f8eSopenharmony_ci * @param { string } src - Path of the image object. 198461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 198561847f8eSopenharmony_ci * @form 198661847f8eSopenharmony_ci * @since 9 198761847f8eSopenharmony_ci */ 198861847f8eSopenharmony_ci /** 198961847f8eSopenharmony_ci * Create an ImageBitmap object based on the transferred image path. 199061847f8eSopenharmony_ci * 199161847f8eSopenharmony_ci * @param { string } src - Path of the image object. 199261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 199361847f8eSopenharmony_ci * @crossplatform 199461847f8eSopenharmony_ci * @form 199561847f8eSopenharmony_ci * @since 10 199661847f8eSopenharmony_ci */ 199761847f8eSopenharmony_ci /** 199861847f8eSopenharmony_ci * Create an ImageBitmap object based on the transferred image path. 199961847f8eSopenharmony_ci * 200061847f8eSopenharmony_ci * @param { string } src - Path of the image object. 200161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 200261847f8eSopenharmony_ci * @crossplatform 200361847f8eSopenharmony_ci * @form 200461847f8eSopenharmony_ci * @atomicservice 200561847f8eSopenharmony_ci * @since 11 200661847f8eSopenharmony_ci */ 200761847f8eSopenharmony_ci constructor(src: string); 200861847f8eSopenharmony_ci 200961847f8eSopenharmony_ci /** 201061847f8eSopenharmony_ci * Create an ImageBitmap object based on the transferred image path. 201161847f8eSopenharmony_ci * 201261847f8eSopenharmony_ci * @param { string } src - Path of the image object. 201361847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 201461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 201561847f8eSopenharmony_ci * @crossplatform 201661847f8eSopenharmony_ci * @form 201761847f8eSopenharmony_ci * @atomicservice 201861847f8eSopenharmony_ci * @since 12 201961847f8eSopenharmony_ci */ 202061847f8eSopenharmony_ci constructor(src: string, unit: LengthMetricsUnit); 202161847f8eSopenharmony_ci 202261847f8eSopenharmony_ci /** 202361847f8eSopenharmony_ci * Transfer a PixelMap object to construct an ImageBitmap object. 202461847f8eSopenharmony_ci * 202561847f8eSopenharmony_ci * @param { PixelMap } data - PixelMap object 202661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 202761847f8eSopenharmony_ci * @since 8 202861847f8eSopenharmony_ci */ 202961847f8eSopenharmony_ci /** 203061847f8eSopenharmony_ci * Transfer a PixelMap object to construct an ImageBitmap object. 203161847f8eSopenharmony_ci * 203261847f8eSopenharmony_ci * @param { PixelMap } data - PixelMap object 203361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 203461847f8eSopenharmony_ci * @crossplatform 203561847f8eSopenharmony_ci * @since 10 203661847f8eSopenharmony_ci */ 203761847f8eSopenharmony_ci /** 203861847f8eSopenharmony_ci * Transfer a PixelMap object to construct an ImageBitmap object. 203961847f8eSopenharmony_ci * 204061847f8eSopenharmony_ci * @param { PixelMap } data - PixelMap object 204161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 204261847f8eSopenharmony_ci * @crossplatform 204361847f8eSopenharmony_ci * @atomicservice 204461847f8eSopenharmony_ci * @since 11 204561847f8eSopenharmony_ci */ 204661847f8eSopenharmony_ci constructor(data: PixelMap); 204761847f8eSopenharmony_ci 204861847f8eSopenharmony_ci /** 204961847f8eSopenharmony_ci * Transfer a PixelMap object to construct an ImageBitmap object. 205061847f8eSopenharmony_ci * 205161847f8eSopenharmony_ci * @param { PixelMap } data - PixelMap object 205261847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 205361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 205461847f8eSopenharmony_ci * @crossplatform 205561847f8eSopenharmony_ci * @atomicservice 205661847f8eSopenharmony_ci * @since 12 205761847f8eSopenharmony_ci */ 205861847f8eSopenharmony_ci constructor(data: PixelMap, unit: LengthMetricsUnit); 205961847f8eSopenharmony_ci} 206061847f8eSopenharmony_ci 206161847f8eSopenharmony_ci/** 206261847f8eSopenharmony_ci * Image data object 206361847f8eSopenharmony_ci * 206461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 206561847f8eSopenharmony_ci * @since 8 206661847f8eSopenharmony_ci */ 206761847f8eSopenharmony_ci/** 206861847f8eSopenharmony_ci * Image data object 206961847f8eSopenharmony_ci * 207061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 207161847f8eSopenharmony_ci * @form 207261847f8eSopenharmony_ci * @since 9 207361847f8eSopenharmony_ci */ 207461847f8eSopenharmony_ci/** 207561847f8eSopenharmony_ci * Image data object 207661847f8eSopenharmony_ci * 207761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 207861847f8eSopenharmony_ci * @crossplatform 207961847f8eSopenharmony_ci * @form 208061847f8eSopenharmony_ci * @since 10 208161847f8eSopenharmony_ci */ 208261847f8eSopenharmony_ci/** 208361847f8eSopenharmony_ci * Image data object 208461847f8eSopenharmony_ci * 208561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 208661847f8eSopenharmony_ci * @crossplatform 208761847f8eSopenharmony_ci * @form 208861847f8eSopenharmony_ci * @atomicservice 208961847f8eSopenharmony_ci * @since 11 209061847f8eSopenharmony_ci */ 209161847f8eSopenharmony_cideclare class ImageData { 209261847f8eSopenharmony_ci /** 209361847f8eSopenharmony_ci * Array containing image pixel data 209461847f8eSopenharmony_ci * 209561847f8eSopenharmony_ci * @type { Uint8ClampedArray } 209661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 209761847f8eSopenharmony_ci * @since 8 209861847f8eSopenharmony_ci */ 209961847f8eSopenharmony_ci /** 210061847f8eSopenharmony_ci * Array containing image pixel data 210161847f8eSopenharmony_ci * 210261847f8eSopenharmony_ci * @type { Uint8ClampedArray } 210361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 210461847f8eSopenharmony_ci * @form 210561847f8eSopenharmony_ci * @since 9 210661847f8eSopenharmony_ci */ 210761847f8eSopenharmony_ci /** 210861847f8eSopenharmony_ci * Array containing image pixel data 210961847f8eSopenharmony_ci * 211061847f8eSopenharmony_ci * @type { Uint8ClampedArray } 211161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 211261847f8eSopenharmony_ci * @crossplatform 211361847f8eSopenharmony_ci * @form 211461847f8eSopenharmony_ci * @since 10 211561847f8eSopenharmony_ci */ 211661847f8eSopenharmony_ci /** 211761847f8eSopenharmony_ci * Array containing image pixel data 211861847f8eSopenharmony_ci * 211961847f8eSopenharmony_ci * @type { Uint8ClampedArray } 212061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 212161847f8eSopenharmony_ci * @crossplatform 212261847f8eSopenharmony_ci * @form 212361847f8eSopenharmony_ci * @atomicservice 212461847f8eSopenharmony_ci * @since 11 212561847f8eSopenharmony_ci */ 212661847f8eSopenharmony_ci readonly data: Uint8ClampedArray; 212761847f8eSopenharmony_ci 212861847f8eSopenharmony_ci /** 212961847f8eSopenharmony_ci * Width of the image. 213061847f8eSopenharmony_ci * 213161847f8eSopenharmony_ci * @type { number } 213261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 213361847f8eSopenharmony_ci * @since 8 213461847f8eSopenharmony_ci */ 213561847f8eSopenharmony_ci /** 213661847f8eSopenharmony_ci * Width of the image. 213761847f8eSopenharmony_ci * 213861847f8eSopenharmony_ci * @type { number } 213961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 214061847f8eSopenharmony_ci * @form 214161847f8eSopenharmony_ci * @since 9 214261847f8eSopenharmony_ci */ 214361847f8eSopenharmony_ci /** 214461847f8eSopenharmony_ci * Width of the image. 214561847f8eSopenharmony_ci * 214661847f8eSopenharmony_ci * @type { number } 214761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 214861847f8eSopenharmony_ci * @crossplatform 214961847f8eSopenharmony_ci * @form 215061847f8eSopenharmony_ci * @since 10 215161847f8eSopenharmony_ci */ 215261847f8eSopenharmony_ci /** 215361847f8eSopenharmony_ci * Width of the image. 215461847f8eSopenharmony_ci * 215561847f8eSopenharmony_ci * @type { number } 215661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 215761847f8eSopenharmony_ci * @crossplatform 215861847f8eSopenharmony_ci * @form 215961847f8eSopenharmony_ci * @atomicservice 216061847f8eSopenharmony_ci * @since 11 216161847f8eSopenharmony_ci */ 216261847f8eSopenharmony_ci readonly height: number; 216361847f8eSopenharmony_ci 216461847f8eSopenharmony_ci /** 216561847f8eSopenharmony_ci * Height of the image. 216661847f8eSopenharmony_ci * 216761847f8eSopenharmony_ci * @type { number } 216861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 216961847f8eSopenharmony_ci * @since 8 217061847f8eSopenharmony_ci */ 217161847f8eSopenharmony_ci /** 217261847f8eSopenharmony_ci * Height of the image. 217361847f8eSopenharmony_ci * 217461847f8eSopenharmony_ci * @type { number } 217561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 217661847f8eSopenharmony_ci * @form 217761847f8eSopenharmony_ci * @since 9 217861847f8eSopenharmony_ci */ 217961847f8eSopenharmony_ci /** 218061847f8eSopenharmony_ci * Height of the image. 218161847f8eSopenharmony_ci * 218261847f8eSopenharmony_ci * @type { number } 218361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 218461847f8eSopenharmony_ci * @crossplatform 218561847f8eSopenharmony_ci * @form 218661847f8eSopenharmony_ci * @since 10 218761847f8eSopenharmony_ci */ 218861847f8eSopenharmony_ci /** 218961847f8eSopenharmony_ci * Height of the image. 219061847f8eSopenharmony_ci * 219161847f8eSopenharmony_ci * @type { number } 219261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 219361847f8eSopenharmony_ci * @crossplatform 219461847f8eSopenharmony_ci * @form 219561847f8eSopenharmony_ci * @atomicservice 219661847f8eSopenharmony_ci * @since 11 219761847f8eSopenharmony_ci */ 219861847f8eSopenharmony_ci readonly width: number; 219961847f8eSopenharmony_ci 220061847f8eSopenharmony_ci /** 220161847f8eSopenharmony_ci * Create an ImageData object based on the input parameters. 220261847f8eSopenharmony_ci * 220361847f8eSopenharmony_ci * @param { number } width - Width of the image. 220461847f8eSopenharmony_ci * @param { number } height - Height of the image. 220561847f8eSopenharmony_ci * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image. 220661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 220761847f8eSopenharmony_ci * @since 8 220861847f8eSopenharmony_ci */ 220961847f8eSopenharmony_ci /** 221061847f8eSopenharmony_ci * Create an ImageData object based on the input parameters. 221161847f8eSopenharmony_ci * 221261847f8eSopenharmony_ci * @param { number } width - Width of the image. 221361847f8eSopenharmony_ci * @param { number } height - Height of the image. 221461847f8eSopenharmony_ci * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image. 221561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 221661847f8eSopenharmony_ci * @form 221761847f8eSopenharmony_ci * @since 9 221861847f8eSopenharmony_ci */ 221961847f8eSopenharmony_ci /** 222061847f8eSopenharmony_ci * Create an ImageData object based on the input parameters. 222161847f8eSopenharmony_ci * 222261847f8eSopenharmony_ci * @param { number } width - Width of the image. 222361847f8eSopenharmony_ci * @param { number } height - Height of the image. 222461847f8eSopenharmony_ci * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image. 222561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 222661847f8eSopenharmony_ci * @crossplatform 222761847f8eSopenharmony_ci * @form 222861847f8eSopenharmony_ci * @since 10 222961847f8eSopenharmony_ci */ 223061847f8eSopenharmony_ci /** 223161847f8eSopenharmony_ci * Create an ImageData object based on the input parameters. 223261847f8eSopenharmony_ci * 223361847f8eSopenharmony_ci * @param { number } width - Width of the image. 223461847f8eSopenharmony_ci * @param { number } height - Height of the image. 223561847f8eSopenharmony_ci * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image. 223661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 223761847f8eSopenharmony_ci * @crossplatform 223861847f8eSopenharmony_ci * @form 223961847f8eSopenharmony_ci * @atomicservice 224061847f8eSopenharmony_ci * @since 11 224161847f8eSopenharmony_ci */ 224261847f8eSopenharmony_ci constructor(width: number, height: number, data?: Uint8ClampedArray); 224361847f8eSopenharmony_ci 224461847f8eSopenharmony_ci /** 224561847f8eSopenharmony_ci * Create an ImageData object based on the input parameters. 224661847f8eSopenharmony_ci * 224761847f8eSopenharmony_ci * @param { number } width - Width of the image. 224861847f8eSopenharmony_ci * @param { number } height - Height of the image. 224961847f8eSopenharmony_ci * @param { Uint8ClampedArray } data - Data of the image. If this parameter is not specified, the default value is a black rectangular image. 225061847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 225161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 225261847f8eSopenharmony_ci * @crossplatform 225361847f8eSopenharmony_ci * @form 225461847f8eSopenharmony_ci * @atomicservice 225561847f8eSopenharmony_ci * @since 12 225661847f8eSopenharmony_ci */ 225761847f8eSopenharmony_ci constructor(width: number, height: number, data?: Uint8ClampedArray, unit?: LengthMetricsUnit); 225861847f8eSopenharmony_ci} 225961847f8eSopenharmony_ci 226061847f8eSopenharmony_ci/** 226161847f8eSopenharmony_ci * This object allows you to set properties when creating a rendering context 226261847f8eSopenharmony_ci * 226361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 226461847f8eSopenharmony_ci * @since 8 226561847f8eSopenharmony_ci */ 226661847f8eSopenharmony_ci/** 226761847f8eSopenharmony_ci * This object allows you to set properties when creating a rendering context 226861847f8eSopenharmony_ci * 226961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 227061847f8eSopenharmony_ci * @form 227161847f8eSopenharmony_ci * @since 9 227261847f8eSopenharmony_ci */ 227361847f8eSopenharmony_ci/** 227461847f8eSopenharmony_ci * This object allows you to set properties when creating a rendering context 227561847f8eSopenharmony_ci * 227661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 227761847f8eSopenharmony_ci * @crossplatform 227861847f8eSopenharmony_ci * @form 227961847f8eSopenharmony_ci * @since 10 228061847f8eSopenharmony_ci */ 228161847f8eSopenharmony_ci/** 228261847f8eSopenharmony_ci * This object allows you to set properties when creating a rendering context 228361847f8eSopenharmony_ci * 228461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 228561847f8eSopenharmony_ci * @crossplatform 228661847f8eSopenharmony_ci * @form 228761847f8eSopenharmony_ci * @atomicservice 228861847f8eSopenharmony_ci * @since 11 228961847f8eSopenharmony_ci */ 229061847f8eSopenharmony_cideclare class RenderingContextSettings { 229161847f8eSopenharmony_ci /** 229261847f8eSopenharmony_ci * Indicates whether anti-aliasing is enabled for canvas. The default value is false. 229361847f8eSopenharmony_ci * 229461847f8eSopenharmony_ci * @type { ?boolean } 229561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 229661847f8eSopenharmony_ci * @since 8 229761847f8eSopenharmony_ci */ 229861847f8eSopenharmony_ci /** 229961847f8eSopenharmony_ci * Indicates whether anti-aliasing is enabled for canvas. The default value is false. 230061847f8eSopenharmony_ci * 230161847f8eSopenharmony_ci * @type { ?boolean } 230261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 230361847f8eSopenharmony_ci * @form 230461847f8eSopenharmony_ci * @since 9 230561847f8eSopenharmony_ci */ 230661847f8eSopenharmony_ci /** 230761847f8eSopenharmony_ci * Indicates whether anti-aliasing is enabled for canvas. The default value is false. 230861847f8eSopenharmony_ci * 230961847f8eSopenharmony_ci * @type { ?boolean } 231061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 231161847f8eSopenharmony_ci * @crossplatform 231261847f8eSopenharmony_ci * @form 231361847f8eSopenharmony_ci * @since 10 231461847f8eSopenharmony_ci */ 231561847f8eSopenharmony_ci /** 231661847f8eSopenharmony_ci * Indicates whether anti-aliasing is enabled for canvas. The default value is false. 231761847f8eSopenharmony_ci * 231861847f8eSopenharmony_ci * @type { ?boolean } 231961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 232061847f8eSopenharmony_ci * @crossplatform 232161847f8eSopenharmony_ci * @form 232261847f8eSopenharmony_ci * @atomicservice 232361847f8eSopenharmony_ci * @since 11 232461847f8eSopenharmony_ci */ 232561847f8eSopenharmony_ci antialias?: boolean; 232661847f8eSopenharmony_ci 232761847f8eSopenharmony_ci /** 232861847f8eSopenharmony_ci * Create an RenderingContextSettings object based on the antialias and alpha. 232961847f8eSopenharmony_ci * 233061847f8eSopenharmony_ci * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas 233161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 233261847f8eSopenharmony_ci * @since 8 233361847f8eSopenharmony_ci */ 233461847f8eSopenharmony_ci /** 233561847f8eSopenharmony_ci * Create an RenderingContextSettings object based on the antialias and alpha. 233661847f8eSopenharmony_ci * 233761847f8eSopenharmony_ci * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas 233861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 233961847f8eSopenharmony_ci * @form 234061847f8eSopenharmony_ci * @since 9 234161847f8eSopenharmony_ci */ 234261847f8eSopenharmony_ci /** 234361847f8eSopenharmony_ci * Create an RenderingContextSettings object based on the antialias and alpha. 234461847f8eSopenharmony_ci * 234561847f8eSopenharmony_ci * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas 234661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 234761847f8eSopenharmony_ci * @crossplatform 234861847f8eSopenharmony_ci * @form 234961847f8eSopenharmony_ci * @since 10 235061847f8eSopenharmony_ci */ 235161847f8eSopenharmony_ci /** 235261847f8eSopenharmony_ci * Create an RenderingContextSettings object based on the antialias and alpha. 235361847f8eSopenharmony_ci * 235461847f8eSopenharmony_ci * @param { boolean } antialias - Indicates whether anti-aliasing is enabled for canvas 235561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 235661847f8eSopenharmony_ci * @crossplatform 235761847f8eSopenharmony_ci * @form 235861847f8eSopenharmony_ci * @atomicservice 235961847f8eSopenharmony_ci * @since 11 236061847f8eSopenharmony_ci */ 236161847f8eSopenharmony_ci constructor(antialias?: boolean); 236261847f8eSopenharmony_ci} 236361847f8eSopenharmony_ci 236461847f8eSopenharmony_ci/** 236561847f8eSopenharmony_ci * Canvas renderer for drawing shapes, text, images and other objects 236661847f8eSopenharmony_ci * 236761847f8eSopenharmony_ci * @extends CanvasPath 236861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 236961847f8eSopenharmony_ci * @since 8 237061847f8eSopenharmony_ci */ 237161847f8eSopenharmony_ci/** 237261847f8eSopenharmony_ci * Canvas renderer for drawing shapes, text, images and other objects 237361847f8eSopenharmony_ci * 237461847f8eSopenharmony_ci * @extends CanvasPath 237561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 237661847f8eSopenharmony_ci * @form 237761847f8eSopenharmony_ci * @since 9 237861847f8eSopenharmony_ci */ 237961847f8eSopenharmony_ci/** 238061847f8eSopenharmony_ci * Canvas renderer for drawing shapes, text, images and other objects 238161847f8eSopenharmony_ci * 238261847f8eSopenharmony_ci * @extends CanvasPath 238361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 238461847f8eSopenharmony_ci * @crossplatform 238561847f8eSopenharmony_ci * @form 238661847f8eSopenharmony_ci * @since 10 238761847f8eSopenharmony_ci */ 238861847f8eSopenharmony_ci/** 238961847f8eSopenharmony_ci * Canvas renderer for drawing shapes, text, images and other objects 239061847f8eSopenharmony_ci * 239161847f8eSopenharmony_ci * @extends CanvasPath 239261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 239361847f8eSopenharmony_ci * @crossplatform 239461847f8eSopenharmony_ci * @form 239561847f8eSopenharmony_ci * @atomicservice 239661847f8eSopenharmony_ci * @since 11 239761847f8eSopenharmony_ci */ 239861847f8eSopenharmony_cideclare class CanvasRenderer extends CanvasPath { 239961847f8eSopenharmony_ci /** 240061847f8eSopenharmony_ci * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). 240161847f8eSopenharmony_ci * If the value is out of range, the assignment is invalid. 240261847f8eSopenharmony_ci * 240361847f8eSopenharmony_ci * @type { number } 240461847f8eSopenharmony_ci * @default 1.0 240561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 240661847f8eSopenharmony_ci * @since 8 240761847f8eSopenharmony_ci */ 240861847f8eSopenharmony_ci /** 240961847f8eSopenharmony_ci * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). 241061847f8eSopenharmony_ci * If the value is out of range, the assignment is invalid. 241161847f8eSopenharmony_ci * 241261847f8eSopenharmony_ci * @type { number } 241361847f8eSopenharmony_ci * @default 1.0 241461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 241561847f8eSopenharmony_ci * @form 241661847f8eSopenharmony_ci * @since 9 241761847f8eSopenharmony_ci */ 241861847f8eSopenharmony_ci /** 241961847f8eSopenharmony_ci * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). 242061847f8eSopenharmony_ci * If the value is out of range, the assignment is invalid. 242161847f8eSopenharmony_ci * 242261847f8eSopenharmony_ci * @type { number } 242361847f8eSopenharmony_ci * @default 1.0 242461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 242561847f8eSopenharmony_ci * @crossplatform 242661847f8eSopenharmony_ci * @form 242761847f8eSopenharmony_ci * @since 10 242861847f8eSopenharmony_ci */ 242961847f8eSopenharmony_ci /** 243061847f8eSopenharmony_ci * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). 243161847f8eSopenharmony_ci * If the value is out of range, the assignment is invalid. 243261847f8eSopenharmony_ci * 243361847f8eSopenharmony_ci * @type { number } 243461847f8eSopenharmony_ci * @default 1.0 243561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 243661847f8eSopenharmony_ci * @crossplatform 243761847f8eSopenharmony_ci * @form 243861847f8eSopenharmony_ci * @atomicservice 243961847f8eSopenharmony_ci * @since 11 244061847f8eSopenharmony_ci */ 244161847f8eSopenharmony_ci globalAlpha: number; 244261847f8eSopenharmony_ci 244361847f8eSopenharmony_ci /** 244461847f8eSopenharmony_ci * Type of composition operation applied when drawing a new shape. The following types are supported: 244561847f8eSopenharmony_ci * source-over: (Default) Draws a new drawing on top of an existing canvas context. 244661847f8eSopenharmony_ci * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. 244761847f8eSopenharmony_ci * Everything else is transparent. 244861847f8eSopenharmony_ci * source-out: Draws a new drawing where it does not overlap with the existing canvas content. 244961847f8eSopenharmony_ci * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. 245061847f8eSopenharmony_ci * destination-over: Draws a new graphic behind the existing canvas content. 245161847f8eSopenharmony_ci * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. 245261847f8eSopenharmony_ci * Everything else is transparent. 245361847f8eSopenharmony_ci * destination-out: Existing content remains where the new drawing does not overlap. 245461847f8eSopenharmony_ci * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, 245561847f8eSopenharmony_ci * which is drawn behind the canvas content. 245661847f8eSopenharmony_ci * lighter: The color of two overlapping shapes is determined by adding the color values. 245761847f8eSopenharmony_ci * copy: Only new graphics are displayed. 245861847f8eSopenharmony_ci * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. 245961847f8eSopenharmony_ci * 246061847f8eSopenharmony_ci * @type { string } 246161847f8eSopenharmony_ci * @default source-over 246261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 246361847f8eSopenharmony_ci * @since 8 246461847f8eSopenharmony_ci */ 246561847f8eSopenharmony_ci /** 246661847f8eSopenharmony_ci * Type of composition operation applied when drawing a new shape. The following types are supported: 246761847f8eSopenharmony_ci * source-over: (Default) Draws a new drawing on top of an existing canvas context. 246861847f8eSopenharmony_ci * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. 246961847f8eSopenharmony_ci * Everything else is transparent. 247061847f8eSopenharmony_ci * source-out: Draws a new drawing where it does not overlap with the existing canvas content. 247161847f8eSopenharmony_ci * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. 247261847f8eSopenharmony_ci * destination-over: Draws a new graphic behind the existing canvas content. 247361847f8eSopenharmony_ci * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. 247461847f8eSopenharmony_ci * Everything else is transparent. 247561847f8eSopenharmony_ci * destination-out: Existing content remains where the new drawing does not overlap. 247661847f8eSopenharmony_ci * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, 247761847f8eSopenharmony_ci * which is drawn behind the canvas content. 247861847f8eSopenharmony_ci * lighter: The color of two overlapping shapes is determined by adding the color values. 247961847f8eSopenharmony_ci * copy: Only new graphics are displayed. 248061847f8eSopenharmony_ci * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. 248161847f8eSopenharmony_ci * 248261847f8eSopenharmony_ci * @type { string } 248361847f8eSopenharmony_ci * @default source-over 248461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 248561847f8eSopenharmony_ci * @form 248661847f8eSopenharmony_ci * @since 9 248761847f8eSopenharmony_ci */ 248861847f8eSopenharmony_ci /** 248961847f8eSopenharmony_ci * Type of composition operation applied when drawing a new shape. The following types are supported: 249061847f8eSopenharmony_ci * source-over: (Default) Draws a new drawing on top of an existing canvas context. 249161847f8eSopenharmony_ci * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. 249261847f8eSopenharmony_ci * Everything else is transparent. 249361847f8eSopenharmony_ci * source-out: Draws a new drawing where it does not overlap with the existing canvas content. 249461847f8eSopenharmony_ci * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. 249561847f8eSopenharmony_ci * destination-over: Draws a new graphic behind the existing canvas content. 249661847f8eSopenharmony_ci * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. 249761847f8eSopenharmony_ci * Everything else is transparent. 249861847f8eSopenharmony_ci * destination-out: Existing content remains where the new drawing does not overlap. 249961847f8eSopenharmony_ci * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, 250061847f8eSopenharmony_ci * which is drawn behind the canvas content. 250161847f8eSopenharmony_ci * lighter: The color of two overlapping shapes is determined by adding the color values. 250261847f8eSopenharmony_ci * copy: Only new graphics are displayed. 250361847f8eSopenharmony_ci * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. 250461847f8eSopenharmony_ci * 250561847f8eSopenharmony_ci * @type { string } 250661847f8eSopenharmony_ci * @default source-over 250761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 250861847f8eSopenharmony_ci * @crossplatform 250961847f8eSopenharmony_ci * @form 251061847f8eSopenharmony_ci * @since 10 251161847f8eSopenharmony_ci */ 251261847f8eSopenharmony_ci /** 251361847f8eSopenharmony_ci * Type of composition operation applied when drawing a new shape. The following types are supported: 251461847f8eSopenharmony_ci * source-over: (Default) Draws a new drawing on top of an existing canvas context. 251561847f8eSopenharmony_ci * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. 251661847f8eSopenharmony_ci * Everything else is transparent. 251761847f8eSopenharmony_ci * source-out: Draws a new drawing where it does not overlap with the existing canvas content. 251861847f8eSopenharmony_ci * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. 251961847f8eSopenharmony_ci * destination-over: Draws a new graphic behind the existing canvas content. 252061847f8eSopenharmony_ci * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. 252161847f8eSopenharmony_ci * Everything else is transparent. 252261847f8eSopenharmony_ci * destination-out: Existing content remains where the new drawing does not overlap. 252361847f8eSopenharmony_ci * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, 252461847f8eSopenharmony_ci * which is drawn behind the canvas content. 252561847f8eSopenharmony_ci * lighter: The color of two overlapping shapes is determined by adding the color values. 252661847f8eSopenharmony_ci * copy: Only new graphics are displayed. 252761847f8eSopenharmony_ci * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. 252861847f8eSopenharmony_ci * 252961847f8eSopenharmony_ci * @type { string } 253061847f8eSopenharmony_ci * @default source-over 253161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 253261847f8eSopenharmony_ci * @crossplatform 253361847f8eSopenharmony_ci * @form 253461847f8eSopenharmony_ci * @atomicservice 253561847f8eSopenharmony_ci * @since 11 253661847f8eSopenharmony_ci */ 253761847f8eSopenharmony_ci globalCompositeOperation: string; 253861847f8eSopenharmony_ci 253961847f8eSopenharmony_ci /** 254061847f8eSopenharmony_ci * Draw an image on a canvas 254161847f8eSopenharmony_ci * 254261847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 254361847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 254461847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 254561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 254661847f8eSopenharmony_ci * @since 8 254761847f8eSopenharmony_ci */ 254861847f8eSopenharmony_ci /** 254961847f8eSopenharmony_ci * Draw an image on a canvas 255061847f8eSopenharmony_ci * 255161847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 255261847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 255361847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 255461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 255561847f8eSopenharmony_ci * @form 255661847f8eSopenharmony_ci * @since 9 255761847f8eSopenharmony_ci */ 255861847f8eSopenharmony_ci /** 255961847f8eSopenharmony_ci * Draw an image on a canvas 256061847f8eSopenharmony_ci * 256161847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 256261847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 256361847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 256461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 256561847f8eSopenharmony_ci * @crossplatform 256661847f8eSopenharmony_ci * @form 256761847f8eSopenharmony_ci * @since 10 256861847f8eSopenharmony_ci */ 256961847f8eSopenharmony_ci /** 257061847f8eSopenharmony_ci * Draw an image on a canvas 257161847f8eSopenharmony_ci * 257261847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 257361847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 257461847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 257561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 257661847f8eSopenharmony_ci * @crossplatform 257761847f8eSopenharmony_ci * @form 257861847f8eSopenharmony_ci * @atomicservice 257961847f8eSopenharmony_ci * @since 11 258061847f8eSopenharmony_ci */ 258161847f8eSopenharmony_ci drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number): void; 258261847f8eSopenharmony_ci 258361847f8eSopenharmony_ci /** 258461847f8eSopenharmony_ci * Draw an image on a canvas 258561847f8eSopenharmony_ci * 258661847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 258761847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 258861847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 258961847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 259061847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 259161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 259261847f8eSopenharmony_ci * @since 8 259361847f8eSopenharmony_ci */ 259461847f8eSopenharmony_ci /** 259561847f8eSopenharmony_ci * Draw an image on a canvas 259661847f8eSopenharmony_ci * 259761847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 259861847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 259961847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 260061847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 260161847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 260261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 260361847f8eSopenharmony_ci * @form 260461847f8eSopenharmony_ci * @since 9 260561847f8eSopenharmony_ci */ 260661847f8eSopenharmony_ci /** 260761847f8eSopenharmony_ci * Draw an image on a canvas 260861847f8eSopenharmony_ci * 260961847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 261061847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 261161847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 261261847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 261361847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 261461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 261561847f8eSopenharmony_ci * @crossplatform 261661847f8eSopenharmony_ci * @form 261761847f8eSopenharmony_ci * @since 10 261861847f8eSopenharmony_ci */ 261961847f8eSopenharmony_ci /** 262061847f8eSopenharmony_ci * Draw an image on a canvas 262161847f8eSopenharmony_ci * 262261847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 262361847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 262461847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 262561847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 262661847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 262761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 262861847f8eSopenharmony_ci * @crossplatform 262961847f8eSopenharmony_ci * @form 263061847f8eSopenharmony_ci * @atomicservice 263161847f8eSopenharmony_ci * @since 11 263261847f8eSopenharmony_ci */ 263361847f8eSopenharmony_ci drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number, dw: number, dh: number): void; 263461847f8eSopenharmony_ci 263561847f8eSopenharmony_ci /** 263661847f8eSopenharmony_ci *Draw an image on a canvas 263761847f8eSopenharmony_ci * 263861847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 263961847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 264061847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 264161847f8eSopenharmony_ci * @param { number } sw - Width of the rectangle (cropping) selection box of the image. 264261847f8eSopenharmony_ci * @param { number } sh - Height of the rectangle (cropping) selection box of the image. 264361847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 264461847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 264561847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 264661847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 264761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 264861847f8eSopenharmony_ci * @since 8 264961847f8eSopenharmony_ci */ 265061847f8eSopenharmony_ci /** 265161847f8eSopenharmony_ci *Draw an image on a canvas 265261847f8eSopenharmony_ci * 265361847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 265461847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 265561847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 265661847f8eSopenharmony_ci * @param { number } sw - Width of the rectangle (cropping) selection box of the image. 265761847f8eSopenharmony_ci * @param { number } sh - Height of the rectangle (cropping) selection box of the image. 265861847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 265961847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 266061847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 266161847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 266261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 266361847f8eSopenharmony_ci * @form 266461847f8eSopenharmony_ci * @since 9 266561847f8eSopenharmony_ci */ 266661847f8eSopenharmony_ci /** 266761847f8eSopenharmony_ci *Draw an image on a canvas 266861847f8eSopenharmony_ci * 266961847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 267061847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 267161847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 267261847f8eSopenharmony_ci * @param { number } sw - Width of the rectangle (cropping) selection box of the image. 267361847f8eSopenharmony_ci * @param { number } sh - Height of the rectangle (cropping) selection box of the image. 267461847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 267561847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 267661847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 267761847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 267861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 267961847f8eSopenharmony_ci * @crossplatform 268061847f8eSopenharmony_ci * @form 268161847f8eSopenharmony_ci * @since 10 268261847f8eSopenharmony_ci */ 268361847f8eSopenharmony_ci /** 268461847f8eSopenharmony_ci *Draw an image on a canvas 268561847f8eSopenharmony_ci * 268661847f8eSopenharmony_ci * @param { ImageBitmap | PixelMap } image - Picture objects drawn to the canvas. 268761847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 268861847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangle (cropping) selection box of the image. 268961847f8eSopenharmony_ci * @param { number } sw - Width of the rectangle (cropping) selection box of the image. 269061847f8eSopenharmony_ci * @param { number } sh - Height of the rectangle (cropping) selection box of the image. 269161847f8eSopenharmony_ci * @param { number } dx - x-axis coordinate of the upper left corner of the image on the target canvas. 269261847f8eSopenharmony_ci * @param { number } dy - y-axis coordinate of the upper left corner of the image on the target canvas. 269361847f8eSopenharmony_ci * @param { number } dw - Specifies the drawing width of the image on the target canvas. The width of the drawn image will be scaled. 269461847f8eSopenharmony_ci * @param { number } dh - Specifies the drawing height of the image on the target canvas. The height of the drawn image will be scaled. 269561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 269661847f8eSopenharmony_ci * @crossplatform 269761847f8eSopenharmony_ci * @form 269861847f8eSopenharmony_ci * @atomicservice 269961847f8eSopenharmony_ci * @since 11 270061847f8eSopenharmony_ci */ 270161847f8eSopenharmony_ci drawImage( 270261847f8eSopenharmony_ci image: ImageBitmap | PixelMap, 270361847f8eSopenharmony_ci sx: number, 270461847f8eSopenharmony_ci sy: number, 270561847f8eSopenharmony_ci sw: number, 270661847f8eSopenharmony_ci sh: number, 270761847f8eSopenharmony_ci dx: number, 270861847f8eSopenharmony_ci dy: number, 270961847f8eSopenharmony_ci dw: number, 271061847f8eSopenharmony_ci dh: number, 271161847f8eSopenharmony_ci ): void; 271261847f8eSopenharmony_ci 271361847f8eSopenharmony_ci /** 271461847f8eSopenharmony_ci * Clear the sub-path list and start a new path. 271561847f8eSopenharmony_ci * 271661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 271761847f8eSopenharmony_ci * @since 8 271861847f8eSopenharmony_ci */ 271961847f8eSopenharmony_ci /** 272061847f8eSopenharmony_ci * Clear the sub-path list and start a new path. 272161847f8eSopenharmony_ci * 272261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 272361847f8eSopenharmony_ci * @form 272461847f8eSopenharmony_ci * @since 9 272561847f8eSopenharmony_ci */ 272661847f8eSopenharmony_ci /** 272761847f8eSopenharmony_ci * Clear the sub-path list and start a new path. 272861847f8eSopenharmony_ci * 272961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 273061847f8eSopenharmony_ci * @crossplatform 273161847f8eSopenharmony_ci * @form 273261847f8eSopenharmony_ci * @since 10 273361847f8eSopenharmony_ci */ 273461847f8eSopenharmony_ci /** 273561847f8eSopenharmony_ci * Clear the sub-path list and start a new path. 273661847f8eSopenharmony_ci * 273761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 273861847f8eSopenharmony_ci * @crossplatform 273961847f8eSopenharmony_ci * @form 274061847f8eSopenharmony_ci * @atomicservice 274161847f8eSopenharmony_ci * @since 11 274261847f8eSopenharmony_ci */ 274361847f8eSopenharmony_ci beginPath(): void; 274461847f8eSopenharmony_ci 274561847f8eSopenharmony_ci /** 274661847f8eSopenharmony_ci * Sets the currently created path as the current clipping path 274761847f8eSopenharmony_ci * 274861847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 274961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 275061847f8eSopenharmony_ci * @since 8 275161847f8eSopenharmony_ci */ 275261847f8eSopenharmony_ci /** 275361847f8eSopenharmony_ci * Sets the currently created path as the current clipping path 275461847f8eSopenharmony_ci * 275561847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 275661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 275761847f8eSopenharmony_ci * @form 275861847f8eSopenharmony_ci * @since 9 275961847f8eSopenharmony_ci */ 276061847f8eSopenharmony_ci /** 276161847f8eSopenharmony_ci * Sets the currently created path as the current clipping path 276261847f8eSopenharmony_ci * 276361847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 276461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 276561847f8eSopenharmony_ci * @crossplatform 276661847f8eSopenharmony_ci * @form 276761847f8eSopenharmony_ci * @since 10 276861847f8eSopenharmony_ci */ 276961847f8eSopenharmony_ci /** 277061847f8eSopenharmony_ci * Sets the currently created path as the current clipping path 277161847f8eSopenharmony_ci * 277261847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 277361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 277461847f8eSopenharmony_ci * @crossplatform 277561847f8eSopenharmony_ci * @form 277661847f8eSopenharmony_ci * @atomicservice 277761847f8eSopenharmony_ci * @since 11 277861847f8eSopenharmony_ci */ 277961847f8eSopenharmony_ci clip(fillRule?: CanvasFillRule): void; 278061847f8eSopenharmony_ci 278161847f8eSopenharmony_ci /** 278261847f8eSopenharmony_ci * Tailoring according to the specified path 278361847f8eSopenharmony_ci * 278461847f8eSopenharmony_ci * @param { Path2D } path - Path to be cut. 278561847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 278661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 278761847f8eSopenharmony_ci * @since 8 278861847f8eSopenharmony_ci */ 278961847f8eSopenharmony_ci /** 279061847f8eSopenharmony_ci * Tailoring according to the specified path 279161847f8eSopenharmony_ci * 279261847f8eSopenharmony_ci * @param { Path2D } path - Path to be cut. 279361847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 279461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 279561847f8eSopenharmony_ci * @form 279661847f8eSopenharmony_ci * @since 9 279761847f8eSopenharmony_ci */ 279861847f8eSopenharmony_ci /** 279961847f8eSopenharmony_ci * Tailoring according to the specified path 280061847f8eSopenharmony_ci * 280161847f8eSopenharmony_ci * @param { Path2D } path - Path to be cut. 280261847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 280361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 280461847f8eSopenharmony_ci * @crossplatform 280561847f8eSopenharmony_ci * @form 280661847f8eSopenharmony_ci * @since 10 280761847f8eSopenharmony_ci */ 280861847f8eSopenharmony_ci /** 280961847f8eSopenharmony_ci * Tailoring according to the specified path 281061847f8eSopenharmony_ci * 281161847f8eSopenharmony_ci * @param { Path2D } path - Path to be cut. 281261847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 281361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 281461847f8eSopenharmony_ci * @crossplatform 281561847f8eSopenharmony_ci * @form 281661847f8eSopenharmony_ci * @atomicservice 281761847f8eSopenharmony_ci * @since 11 281861847f8eSopenharmony_ci */ 281961847f8eSopenharmony_ci clip(path: Path2D, fillRule?: CanvasFillRule): void; 282061847f8eSopenharmony_ci 282161847f8eSopenharmony_ci /** 282261847f8eSopenharmony_ci * Fills existing paths according to the current fill style. 282361847f8eSopenharmony_ci * 282461847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 282561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 282661847f8eSopenharmony_ci * @since 8 282761847f8eSopenharmony_ci */ 282861847f8eSopenharmony_ci /** 282961847f8eSopenharmony_ci * Fills existing paths according to the current fill style. 283061847f8eSopenharmony_ci * 283161847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 283261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 283361847f8eSopenharmony_ci * @form 283461847f8eSopenharmony_ci * @since 9 283561847f8eSopenharmony_ci */ 283661847f8eSopenharmony_ci /** 283761847f8eSopenharmony_ci * Fills existing paths according to the current fill style. 283861847f8eSopenharmony_ci * 283961847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 284061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 284161847f8eSopenharmony_ci * @crossplatform 284261847f8eSopenharmony_ci * @form 284361847f8eSopenharmony_ci * @since 10 284461847f8eSopenharmony_ci */ 284561847f8eSopenharmony_ci /** 284661847f8eSopenharmony_ci * Fills existing paths according to the current fill style. 284761847f8eSopenharmony_ci * 284861847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 284961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 285061847f8eSopenharmony_ci * @crossplatform 285161847f8eSopenharmony_ci * @form 285261847f8eSopenharmony_ci * @atomicservice 285361847f8eSopenharmony_ci * @since 11 285461847f8eSopenharmony_ci */ 285561847f8eSopenharmony_ci fill(fillRule?: CanvasFillRule): void; 285661847f8eSopenharmony_ci 285761847f8eSopenharmony_ci /** 285861847f8eSopenharmony_ci * Fills the specified path according to the current fill style 285961847f8eSopenharmony_ci * 286061847f8eSopenharmony_ci * @param { Path2D } path - Path to be filled. 286161847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 286261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 286361847f8eSopenharmony_ci * @since 8 286461847f8eSopenharmony_ci */ 286561847f8eSopenharmony_ci /** 286661847f8eSopenharmony_ci * Fills the specified path according to the current fill style 286761847f8eSopenharmony_ci * 286861847f8eSopenharmony_ci * @param { Path2D } path - Path to be filled. 286961847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 287061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 287161847f8eSopenharmony_ci * @form 287261847f8eSopenharmony_ci * @since 9 287361847f8eSopenharmony_ci */ 287461847f8eSopenharmony_ci /** 287561847f8eSopenharmony_ci * Fills the specified path according to the current fill style 287661847f8eSopenharmony_ci * 287761847f8eSopenharmony_ci * @param { Path2D } path - Path to be filled. 287861847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 287961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 288061847f8eSopenharmony_ci * @crossplatform 288161847f8eSopenharmony_ci * @form 288261847f8eSopenharmony_ci * @since 10 288361847f8eSopenharmony_ci */ 288461847f8eSopenharmony_ci /** 288561847f8eSopenharmony_ci * Fills the specified path according to the current fill style 288661847f8eSopenharmony_ci * 288761847f8eSopenharmony_ci * @param { Path2D } path - Path to be filled. 288861847f8eSopenharmony_ci * @param { CanvasFillRule } fillRule - Algorithm rule. For details, see {@link CanvasFillRule}. 288961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 289061847f8eSopenharmony_ci * @crossplatform 289161847f8eSopenharmony_ci * @form 289261847f8eSopenharmony_ci * @atomicservice 289361847f8eSopenharmony_ci * @since 11 289461847f8eSopenharmony_ci */ 289561847f8eSopenharmony_ci fill(path: Path2D, fillRule?: CanvasFillRule): void; 289661847f8eSopenharmony_ci 289761847f8eSopenharmony_ci /** 289861847f8eSopenharmony_ci * Draws an existing path according to the current stroke style. 289961847f8eSopenharmony_ci * 290061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 290161847f8eSopenharmony_ci * @since 8 290261847f8eSopenharmony_ci */ 290361847f8eSopenharmony_ci /** 290461847f8eSopenharmony_ci * Draws an existing path according to the current stroke style. 290561847f8eSopenharmony_ci * 290661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 290761847f8eSopenharmony_ci * @form 290861847f8eSopenharmony_ci * @since 9 290961847f8eSopenharmony_ci */ 291061847f8eSopenharmony_ci /** 291161847f8eSopenharmony_ci * Draws an existing path according to the current stroke style. 291261847f8eSopenharmony_ci * 291361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 291461847f8eSopenharmony_ci * @crossplatform 291561847f8eSopenharmony_ci * @form 291661847f8eSopenharmony_ci * @since 10 291761847f8eSopenharmony_ci */ 291861847f8eSopenharmony_ci /** 291961847f8eSopenharmony_ci * Draws an existing path according to the current stroke style. 292061847f8eSopenharmony_ci * 292161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 292261847f8eSopenharmony_ci * @crossplatform 292361847f8eSopenharmony_ci * @form 292461847f8eSopenharmony_ci * @atomicservice 292561847f8eSopenharmony_ci * @since 11 292661847f8eSopenharmony_ci */ 292761847f8eSopenharmony_ci stroke(): void; 292861847f8eSopenharmony_ci 292961847f8eSopenharmony_ci /** 293061847f8eSopenharmony_ci * Draws the specified path according to the current stroke style 293161847f8eSopenharmony_ci * 293261847f8eSopenharmony_ci * @param { Path2D } path - Specified stroke path object 293361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 293461847f8eSopenharmony_ci * @since 8 293561847f8eSopenharmony_ci */ 293661847f8eSopenharmony_ci /** 293761847f8eSopenharmony_ci * Draws the specified path according to the current stroke style 293861847f8eSopenharmony_ci * 293961847f8eSopenharmony_ci * @param { Path2D } path - Specified stroke path object 294061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 294161847f8eSopenharmony_ci * @form 294261847f8eSopenharmony_ci * @since 9 294361847f8eSopenharmony_ci */ 294461847f8eSopenharmony_ci /** 294561847f8eSopenharmony_ci * Draws the specified path according to the current stroke style 294661847f8eSopenharmony_ci * 294761847f8eSopenharmony_ci * @param { Path2D } path - Specified stroke path object 294861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 294961847f8eSopenharmony_ci * @crossplatform 295061847f8eSopenharmony_ci * @form 295161847f8eSopenharmony_ci * @since 10 295261847f8eSopenharmony_ci */ 295361847f8eSopenharmony_ci /** 295461847f8eSopenharmony_ci * Draws the specified path according to the current stroke style 295561847f8eSopenharmony_ci * 295661847f8eSopenharmony_ci * @param { Path2D } path - Specified stroke path object 295761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 295861847f8eSopenharmony_ci * @crossplatform 295961847f8eSopenharmony_ci * @form 296061847f8eSopenharmony_ci * @atomicservice 296161847f8eSopenharmony_ci * @since 11 296261847f8eSopenharmony_ci */ 296361847f8eSopenharmony_ci stroke(path: Path2D): void; 296461847f8eSopenharmony_ci 296561847f8eSopenharmony_ci /** 296661847f8eSopenharmony_ci * Attributes that describe the fill color and style. The options are as follows: 296761847f8eSopenharmony_ci * color: Color String 296861847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 296961847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 297061847f8eSopenharmony_ci * 297161847f8eSopenharmony_ci * @type { string | CanvasGradient | CanvasPattern } 297261847f8eSopenharmony_ci * @default #000000 (black) 297361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 297461847f8eSopenharmony_ci * @since 8 297561847f8eSopenharmony_ci */ 297661847f8eSopenharmony_ci /** 297761847f8eSopenharmony_ci * Attributes that describe the fill color and style. The options are as follows: 297861847f8eSopenharmony_ci * color: Color String 297961847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 298061847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 298161847f8eSopenharmony_ci * 298261847f8eSopenharmony_ci * @type { string | CanvasGradient | CanvasPattern } 298361847f8eSopenharmony_ci * @default #000000 (black) 298461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 298561847f8eSopenharmony_ci * @form 298661847f8eSopenharmony_ci * @since 9 298761847f8eSopenharmony_ci */ 298861847f8eSopenharmony_ci /** 298961847f8eSopenharmony_ci * Attributes that describe the fill color and style. The options are as follows: 299061847f8eSopenharmony_ci * 299161847f8eSopenharmony_ci * @type { string | number | CanvasGradient | CanvasPattern } 299261847f8eSopenharmony_ci * string: Color String. 299361847f8eSopenharmony_ci * number: Indicates the color with number. 299461847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 299561847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 299661847f8eSopenharmony_ci * @default #000000 (black) 299761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 299861847f8eSopenharmony_ci * @crossplatform 299961847f8eSopenharmony_ci * @form 300061847f8eSopenharmony_ci * @since 10 300161847f8eSopenharmony_ci */ 300261847f8eSopenharmony_ci /** 300361847f8eSopenharmony_ci * Attributes that describe the fill color and style. The options are as follows: 300461847f8eSopenharmony_ci * 300561847f8eSopenharmony_ci * @type { string | number | CanvasGradient | CanvasPattern } 300661847f8eSopenharmony_ci * string: Color String. 300761847f8eSopenharmony_ci * number: Indicates the color with number. 300861847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 300961847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 301061847f8eSopenharmony_ci * @default #000000 (black) 301161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 301261847f8eSopenharmony_ci * @crossplatform 301361847f8eSopenharmony_ci * @form 301461847f8eSopenharmony_ci * @atomicservice 301561847f8eSopenharmony_ci * @since 11 301661847f8eSopenharmony_ci */ 301761847f8eSopenharmony_ci fillStyle: string | number | CanvasGradient | CanvasPattern; 301861847f8eSopenharmony_ci 301961847f8eSopenharmony_ci /** 302061847f8eSopenharmony_ci * Attributes of the stroke color and style. The options are as follows: 302161847f8eSopenharmony_ci * color: Color String 302261847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 302361847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 302461847f8eSopenharmony_ci * 302561847f8eSopenharmony_ci * @type { string | CanvasGradient | CanvasPattern } 302661847f8eSopenharmony_ci * @default #000000 (black) 302761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 302861847f8eSopenharmony_ci * @since 8 302961847f8eSopenharmony_ci */ 303061847f8eSopenharmony_ci /** 303161847f8eSopenharmony_ci * Attributes of the stroke color and style. The options are as follows: 303261847f8eSopenharmony_ci * color: Color String 303361847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 303461847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 303561847f8eSopenharmony_ci * 303661847f8eSopenharmony_ci * @type { string | CanvasGradient | CanvasPattern } 303761847f8eSopenharmony_ci * @default #000000 (black) 303861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 303961847f8eSopenharmony_ci * @form 304061847f8eSopenharmony_ci * @since 9 304161847f8eSopenharmony_ci */ 304261847f8eSopenharmony_ci /** 304361847f8eSopenharmony_ci * Attributes of the stroke color and style. The options are as follows: 304461847f8eSopenharmony_ci * 304561847f8eSopenharmony_ci * @type { string | number | CanvasGradient | CanvasPattern } 304661847f8eSopenharmony_ci * string: Color String. 304761847f8eSopenharmony_ci * number: Indicates the color with number. 304861847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 304961847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 305061847f8eSopenharmony_ci * @default #000000 (black) 305161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 305261847f8eSopenharmony_ci * @crossplatform 305361847f8eSopenharmony_ci * @form 305461847f8eSopenharmony_ci * @since 10 305561847f8eSopenharmony_ci */ 305661847f8eSopenharmony_ci /** 305761847f8eSopenharmony_ci * Attributes of the stroke color and style. The options are as follows: 305861847f8eSopenharmony_ci * 305961847f8eSopenharmony_ci * @type { string | number | CanvasGradient | CanvasPattern } 306061847f8eSopenharmony_ci * string: Color String. 306161847f8eSopenharmony_ci * number: Indicates the color with number. 306261847f8eSopenharmony_ci * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. 306361847f8eSopenharmony_ci * CanvasPattern: Template object. For details, see {@link CanvasPattern}. 306461847f8eSopenharmony_ci * @default #000000 (black) 306561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 306661847f8eSopenharmony_ci * @crossplatform 306761847f8eSopenharmony_ci * @form 306861847f8eSopenharmony_ci * @atomicservice 306961847f8eSopenharmony_ci * @since 11 307061847f8eSopenharmony_ci */ 307161847f8eSopenharmony_ci strokeStyle: string | number | CanvasGradient | CanvasPattern; 307261847f8eSopenharmony_ci 307361847f8eSopenharmony_ci /** 307461847f8eSopenharmony_ci * Creates a linear gradient object that is specified along the parameter coordinates 307561847f8eSopenharmony_ci * 307661847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start point. 307761847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start point. 307861847f8eSopenharmony_ci * @param { number } x1 - x-axis coordinate of the end point. 307961847f8eSopenharmony_ci * @param { number } y1 - y-axis coordinate of the end point. 308061847f8eSopenharmony_ci * @returns { CanvasGradient } 308161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 308261847f8eSopenharmony_ci * @since 8 308361847f8eSopenharmony_ci */ 308461847f8eSopenharmony_ci /** 308561847f8eSopenharmony_ci * Creates a linear gradient object that is specified along the parameter coordinates 308661847f8eSopenharmony_ci * 308761847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start point. 308861847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start point. 308961847f8eSopenharmony_ci * @param { number } x1 - x-axis coordinate of the end point. 309061847f8eSopenharmony_ci * @param { number } y1 - y-axis coordinate of the end point. 309161847f8eSopenharmony_ci * @returns { CanvasGradient } 309261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 309361847f8eSopenharmony_ci * @form 309461847f8eSopenharmony_ci * @since 9 309561847f8eSopenharmony_ci */ 309661847f8eSopenharmony_ci /** 309761847f8eSopenharmony_ci * Creates a linear gradient object that is specified along the parameter coordinates 309861847f8eSopenharmony_ci * 309961847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start point. 310061847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start point. 310161847f8eSopenharmony_ci * @param { number } x1 - x-axis coordinate of the end point. 310261847f8eSopenharmony_ci * @param { number } y1 - y-axis coordinate of the end point. 310361847f8eSopenharmony_ci * @returns { CanvasGradient } 310461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 310561847f8eSopenharmony_ci * @crossplatform 310661847f8eSopenharmony_ci * @form 310761847f8eSopenharmony_ci * @since 10 310861847f8eSopenharmony_ci */ 310961847f8eSopenharmony_ci /** 311061847f8eSopenharmony_ci * Creates a linear gradient object that is specified along the parameter coordinates 311161847f8eSopenharmony_ci * 311261847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start point. 311361847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start point. 311461847f8eSopenharmony_ci * @param { number } x1 - x-axis coordinate of the end point. 311561847f8eSopenharmony_ci * @param { number } y1 - y-axis coordinate of the end point. 311661847f8eSopenharmony_ci * @returns { CanvasGradient } 311761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 311861847f8eSopenharmony_ci * @crossplatform 311961847f8eSopenharmony_ci * @form 312061847f8eSopenharmony_ci * @atomicservice 312161847f8eSopenharmony_ci * @since 11 312261847f8eSopenharmony_ci */ 312361847f8eSopenharmony_ci createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; 312461847f8eSopenharmony_ci 312561847f8eSopenharmony_ci /** 312661847f8eSopenharmony_ci * Creates a template object using the specified image 312761847f8eSopenharmony_ci * 312861847f8eSopenharmony_ci * @param { ImageBitmap } image - Objects as duplicate image sources 312961847f8eSopenharmony_ci * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported: 313061847f8eSopenharmony_ci * "repeat": Repeated images in both X and Y directions 313161847f8eSopenharmony_ci * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction 313261847f8eSopenharmony_ci * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction. 313361847f8eSopenharmony_ci * "no-repeat": Non-repeating images in both X and Y directions 313461847f8eSopenharmony_ci * @returns { CanvasPattern | null } 313561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 313661847f8eSopenharmony_ci * @since 8 313761847f8eSopenharmony_ci */ 313861847f8eSopenharmony_ci /** 313961847f8eSopenharmony_ci * Creates a template object using the specified image 314061847f8eSopenharmony_ci * 314161847f8eSopenharmony_ci * @param { ImageBitmap } image - Objects as duplicate image sources 314261847f8eSopenharmony_ci * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported: 314361847f8eSopenharmony_ci * "repeat": Repeated images in both X and Y directions 314461847f8eSopenharmony_ci * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction 314561847f8eSopenharmony_ci * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction. 314661847f8eSopenharmony_ci * "no-repeat": Non-repeating images in both X and Y directions 314761847f8eSopenharmony_ci * @returns { CanvasPattern | null } 314861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 314961847f8eSopenharmony_ci * @form 315061847f8eSopenharmony_ci * @since 9 315161847f8eSopenharmony_ci */ 315261847f8eSopenharmony_ci /** 315361847f8eSopenharmony_ci * Creates a template object using the specified image 315461847f8eSopenharmony_ci * 315561847f8eSopenharmony_ci * @param { ImageBitmap } image - Objects as duplicate image sources 315661847f8eSopenharmony_ci * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported: 315761847f8eSopenharmony_ci * "repeat": Repeated images in both X and Y directions 315861847f8eSopenharmony_ci * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction 315961847f8eSopenharmony_ci * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction. 316061847f8eSopenharmony_ci * "no-repeat": Non-repeating images in both X and Y directions 316161847f8eSopenharmony_ci * "clamp": Replicate the edge color if the shader draws outside of its original bounds. 316261847f8eSopenharmony_ci * "mirror": Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam. 316361847f8eSopenharmony_ci * @returns { CanvasPattern | null } 316461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 316561847f8eSopenharmony_ci * @crossplatform 316661847f8eSopenharmony_ci * @form 316761847f8eSopenharmony_ci * @since 10 316861847f8eSopenharmony_ci */ 316961847f8eSopenharmony_ci /** 317061847f8eSopenharmony_ci * Creates a template object using the specified image 317161847f8eSopenharmony_ci * 317261847f8eSopenharmony_ci * @param { ImageBitmap } image - Objects as duplicate image sources 317361847f8eSopenharmony_ci * @param { string | null } repetition - Specifies how to repeat images. The following four modes are supported: 317461847f8eSopenharmony_ci * "repeat": Repeated images in both X and Y directions 317561847f8eSopenharmony_ci * "repeat-x": Repeated images in the X-axis direction but not in the Y-axis direction 317661847f8eSopenharmony_ci * "repeat-y": The image is repeated in the Y axis direction, and the image is not repeated in the X axis direction. 317761847f8eSopenharmony_ci * "no-repeat": Non-repeating images in both X and Y directions 317861847f8eSopenharmony_ci * "clamp": Replicate the edge color if the shader draws outside of its original bounds. 317961847f8eSopenharmony_ci * "mirror": Repeat the shader's image horizontally and vertically, alternating mirror images so that adjacent images always seam. 318061847f8eSopenharmony_ci * @returns { CanvasPattern | null } 318161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 318261847f8eSopenharmony_ci * @crossplatform 318361847f8eSopenharmony_ci * @form 318461847f8eSopenharmony_ci * @atomicservice 318561847f8eSopenharmony_ci * @since 11 318661847f8eSopenharmony_ci */ 318761847f8eSopenharmony_ci createPattern(image: ImageBitmap, repetition: string | null): CanvasPattern | null; 318861847f8eSopenharmony_ci 318961847f8eSopenharmony_ci /** 319061847f8eSopenharmony_ci * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles 319161847f8eSopenharmony_ci * 319261847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start circle. 319361847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start circle. 319461847f8eSopenharmony_ci * @param { number } r0 - Radius of the starting circle. 319561847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the end circle. 319661847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the end circle. 319761847f8eSopenharmony_ci * @param { number } r1 - Radius of the end circle. 319861847f8eSopenharmony_ci * @returns { CanvasGradient } 319961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 320061847f8eSopenharmony_ci * @since 8 320161847f8eSopenharmony_ci */ 320261847f8eSopenharmony_ci /** 320361847f8eSopenharmony_ci * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles 320461847f8eSopenharmony_ci * 320561847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start circle. 320661847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start circle. 320761847f8eSopenharmony_ci * @param { number } r0 - Radius of the starting circle. 320861847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the end circle. 320961847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the end circle. 321061847f8eSopenharmony_ci * @param { number } r1 - Radius of the end circle. 321161847f8eSopenharmony_ci * @returns { CanvasGradient } 321261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 321361847f8eSopenharmony_ci * @form 321461847f8eSopenharmony_ci * @since 9 321561847f8eSopenharmony_ci */ 321661847f8eSopenharmony_ci /** 321761847f8eSopenharmony_ci * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles 321861847f8eSopenharmony_ci * 321961847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start circle. 322061847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start circle. 322161847f8eSopenharmony_ci * @param { number } r0 - Radius of the starting circle. 322261847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the end circle. 322361847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the end circle. 322461847f8eSopenharmony_ci * @param { number } r1 - Radius of the end circle. 322561847f8eSopenharmony_ci * @returns { CanvasGradient } 322661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 322761847f8eSopenharmony_ci * @crossplatform 322861847f8eSopenharmony_ci * @form 322961847f8eSopenharmony_ci * @since 10 323061847f8eSopenharmony_ci */ 323161847f8eSopenharmony_ci /** 323261847f8eSopenharmony_ci * Creates a radioactive gradient object based on parameters that determine the coordinates of two circles 323361847f8eSopenharmony_ci * 323461847f8eSopenharmony_ci * @param { number } x0 - The x-axis coordinate of the start circle. 323561847f8eSopenharmony_ci * @param { number } y0 - The y-axis coordinate of the start circle. 323661847f8eSopenharmony_ci * @param { number } r0 - Radius of the starting circle. 323761847f8eSopenharmony_ci * @param { number } x1 - The x-axis coordinate of the end circle. 323861847f8eSopenharmony_ci * @param { number } y1 - The y-axis coordinate of the end circle. 323961847f8eSopenharmony_ci * @param { number } r1 - Radius of the end circle. 324061847f8eSopenharmony_ci * @returns { CanvasGradient } 324161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 324261847f8eSopenharmony_ci * @crossplatform 324361847f8eSopenharmony_ci * @form 324461847f8eSopenharmony_ci * @atomicservice 324561847f8eSopenharmony_ci * @since 11 324661847f8eSopenharmony_ci */ 324761847f8eSopenharmony_ci createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; 324861847f8eSopenharmony_ci 324961847f8eSopenharmony_ci /** 325061847f8eSopenharmony_ci * Creates a gradient around a point with given coordinates. 325161847f8eSopenharmony_ci * 325261847f8eSopenharmony_ci * @param { number } startAngle - The angle at which to begin the gradient, in radians. 325361847f8eSopenharmony_ci * Angle measurements start horizontally the right of the center and move around clockwise. 325461847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the center of the gradient. 325561847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the center of the gradient. 325661847f8eSopenharmony_ci * @returns { CanvasGradient } A CanvasGradient object that draws a conic gradient around the given coordinates. 325761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 325861847f8eSopenharmony_ci * @crossplatform 325961847f8eSopenharmony_ci * @since 10 326061847f8eSopenharmony_ci */ 326161847f8eSopenharmony_ci /** 326261847f8eSopenharmony_ci * Creates a gradient around a point with given coordinates. 326361847f8eSopenharmony_ci * 326461847f8eSopenharmony_ci * @param { number } startAngle - The angle at which to begin the gradient, in radians. 326561847f8eSopenharmony_ci * Angle measurements start horizontally the right of the center and move around clockwise. 326661847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the center of the gradient. 326761847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the center of the gradient. 326861847f8eSopenharmony_ci * @returns { CanvasGradient } A CanvasGradient object that draws a conic gradient around the given coordinates. 326961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 327061847f8eSopenharmony_ci * @crossplatform 327161847f8eSopenharmony_ci * @atomicservice 327261847f8eSopenharmony_ci * @since 11 327361847f8eSopenharmony_ci */ 327461847f8eSopenharmony_ci createConicGradient( 327561847f8eSopenharmony_ci startAngle: number, 327661847f8eSopenharmony_ci x: number, 327761847f8eSopenharmony_ci y: number 327861847f8eSopenharmony_ci ): CanvasGradient; 327961847f8eSopenharmony_ci 328061847f8eSopenharmony_ci /** 328161847f8eSopenharmony_ci * Provides filter effects such as blur and grayscale. You can set the following filter effects: 328261847f8eSopenharmony_ci * blur(<length>): Adds a Gaussian blur effect to the drawing 328361847f8eSopenharmony_ci * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level. 328461847f8eSopenharmony_ci * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black. 328561847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 328661847f8eSopenharmony_ci * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray. 328761847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 328861847f8eSopenharmony_ci * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. 328961847f8eSopenharmony_ci * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%, 329061847f8eSopenharmony_ci * the image is completely inverted. When the value is 0%, there is no change in the image. 329161847f8eSopenharmony_ci * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent. 329261847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 329361847f8eSopenharmony_ci * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated. 329461847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 329561847f8eSopenharmony_ci * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. 329661847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 329761847f8eSopenharmony_ci * none: Turn off filter effects 329861847f8eSopenharmony_ci * 329961847f8eSopenharmony_ci * @type { string } 330061847f8eSopenharmony_ci * @default none 330161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 330261847f8eSopenharmony_ci * @since 8 330361847f8eSopenharmony_ci */ 330461847f8eSopenharmony_ci /** 330561847f8eSopenharmony_ci * Provides filter effects such as blur and grayscale. You can set the following filter effects: 330661847f8eSopenharmony_ci * blur(<length>): Adds a Gaussian blur effect to the drawing 330761847f8eSopenharmony_ci * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level. 330861847f8eSopenharmony_ci * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black. 330961847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 331061847f8eSopenharmony_ci * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray. 331161847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 331261847f8eSopenharmony_ci * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. 331361847f8eSopenharmony_ci * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%, 331461847f8eSopenharmony_ci * the image is completely inverted. When the value is 0%, there is no change in the image. 331561847f8eSopenharmony_ci * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent. 331661847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 331761847f8eSopenharmony_ci * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated. 331861847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 331961847f8eSopenharmony_ci * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. 332061847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 332161847f8eSopenharmony_ci * none: Turn off filter effects 332261847f8eSopenharmony_ci * 332361847f8eSopenharmony_ci * @type { string } 332461847f8eSopenharmony_ci * @default none 332561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 332661847f8eSopenharmony_ci * @form 332761847f8eSopenharmony_ci * @since 9 332861847f8eSopenharmony_ci */ 332961847f8eSopenharmony_ci /** 333061847f8eSopenharmony_ci * Provides filter effects such as blur and grayscale. You can set the following filter effects: 333161847f8eSopenharmony_ci * blur(<length>): Adds a Gaussian blur effect to the drawing 333261847f8eSopenharmony_ci * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level. 333361847f8eSopenharmony_ci * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black. 333461847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 333561847f8eSopenharmony_ci * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray. 333661847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 333761847f8eSopenharmony_ci * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. 333861847f8eSopenharmony_ci * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%, 333961847f8eSopenharmony_ci * the image is completely inverted. When the value is 0%, there is no change in the image. 334061847f8eSopenharmony_ci * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent. 334161847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 334261847f8eSopenharmony_ci * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated. 334361847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 334461847f8eSopenharmony_ci * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. 334561847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 334661847f8eSopenharmony_ci * none: Turn off filter effects 334761847f8eSopenharmony_ci * 334861847f8eSopenharmony_ci * @type { string } 334961847f8eSopenharmony_ci * @default none 335061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 335161847f8eSopenharmony_ci * @crossplatform 335261847f8eSopenharmony_ci * @form 335361847f8eSopenharmony_ci * @since 10 335461847f8eSopenharmony_ci */ 335561847f8eSopenharmony_ci /** 335661847f8eSopenharmony_ci * Provides filter effects such as blur and grayscale. You can set the following filter effects: 335761847f8eSopenharmony_ci * blur(<length>): Adds a Gaussian blur effect to the drawing 335861847f8eSopenharmony_ci * brightness(<percentage>): Provides a linear multiplication for the drawing and adjusts the brightness level. 335961847f8eSopenharmony_ci * contrast(<percentage>): Adjusts the contrast of the image. When the value is 0%, the image is completely black. 336061847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 336161847f8eSopenharmony_ci * grayscale(<percentage>): Converts the image to a gray image. When the value is 100%, the image is completely gray. 336261847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 336361847f8eSopenharmony_ci * hue-rotate(<degree>): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. 336461847f8eSopenharmony_ci * invert(<percentage>): Inverted image (representing the effect of a photographic negative). When the value is 100%, 336561847f8eSopenharmony_ci * the image is completely inverted. When the value is 0%, there is no change in the image. 336661847f8eSopenharmony_ci * opacity(<percentage>): Transparency of the image. At 0%, the image is completely transparent. 336761847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 336861847f8eSopenharmony_ci * saturate(<percentage>): Perform saturation processing on the image. At 0%, the image is completely un-saturated. 336961847f8eSopenharmony_ci * When the value is 100%, there is no change in the image. 337061847f8eSopenharmony_ci * sepia(<percentage>): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. 337161847f8eSopenharmony_ci * When the value is 0%, there is no change in the image. 337261847f8eSopenharmony_ci * none: Turn off filter effects 337361847f8eSopenharmony_ci * 337461847f8eSopenharmony_ci * @type { string } 337561847f8eSopenharmony_ci * @default none 337661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 337761847f8eSopenharmony_ci * @crossplatform 337861847f8eSopenharmony_ci * @form 337961847f8eSopenharmony_ci * @atomicservice 338061847f8eSopenharmony_ci * @since 11 338161847f8eSopenharmony_ci */ 338261847f8eSopenharmony_ci filter: string; 338361847f8eSopenharmony_ci 338461847f8eSopenharmony_ci /** 338561847f8eSopenharmony_ci * Creates a new, empty ImageData object of the specified size 338661847f8eSopenharmony_ci * 338761847f8eSopenharmony_ci * @param { number } sw - Width of the ImageData object. 338861847f8eSopenharmony_ci * @param { number } sh - Height of the ImageData object. 338961847f8eSopenharmony_ci * @returns { ImageData } 339061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 339161847f8eSopenharmony_ci * @since 8 339261847f8eSopenharmony_ci */ 339361847f8eSopenharmony_ci /** 339461847f8eSopenharmony_ci * Creates a new, empty ImageData object of the specified size 339561847f8eSopenharmony_ci * 339661847f8eSopenharmony_ci * @param { number } sw - Width of the ImageData object. 339761847f8eSopenharmony_ci * @param { number } sh - Height of the ImageData object. 339861847f8eSopenharmony_ci * @returns { ImageData } 339961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 340061847f8eSopenharmony_ci * @form 340161847f8eSopenharmony_ci * @since 9 340261847f8eSopenharmony_ci */ 340361847f8eSopenharmony_ci /** 340461847f8eSopenharmony_ci * Creates a new, empty ImageData object of the specified size 340561847f8eSopenharmony_ci * 340661847f8eSopenharmony_ci * @param { number } sw - Width of the ImageData object. 340761847f8eSopenharmony_ci * @param { number } sh - Height of the ImageData object. 340861847f8eSopenharmony_ci * @returns { ImageData } 340961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 341061847f8eSopenharmony_ci * @crossplatform 341161847f8eSopenharmony_ci * @form 341261847f8eSopenharmony_ci * @since 10 341361847f8eSopenharmony_ci */ 341461847f8eSopenharmony_ci /** 341561847f8eSopenharmony_ci * Creates a new, empty ImageData object of the specified size 341661847f8eSopenharmony_ci * 341761847f8eSopenharmony_ci * @param { number } sw - Width of the ImageData object. 341861847f8eSopenharmony_ci * @param { number } sh - Height of the ImageData object. 341961847f8eSopenharmony_ci * @returns { ImageData } 342061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 342161847f8eSopenharmony_ci * @crossplatform 342261847f8eSopenharmony_ci * @form 342361847f8eSopenharmony_ci * @atomicservice 342461847f8eSopenharmony_ci * @since 11 342561847f8eSopenharmony_ci */ 342661847f8eSopenharmony_ci createImageData(sw: number, sh: number): ImageData; 342761847f8eSopenharmony_ci 342861847f8eSopenharmony_ci /** 342961847f8eSopenharmony_ci * From an existing ImageData object, copy an object with the same width and height as the image. 343061847f8eSopenharmony_ci * The image content is not copied. 343161847f8eSopenharmony_ci * 343261847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be copied. 343361847f8eSopenharmony_ci * @returns { ImageData } 343461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 343561847f8eSopenharmony_ci * @since 8 343661847f8eSopenharmony_ci */ 343761847f8eSopenharmony_ci /** 343861847f8eSopenharmony_ci * From an existing ImageData object, copy an object with the same width and height as the image. 343961847f8eSopenharmony_ci * The image content is not copied. 344061847f8eSopenharmony_ci * 344161847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be copied. 344261847f8eSopenharmony_ci * @returns { ImageData } 344361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 344461847f8eSopenharmony_ci * @form 344561847f8eSopenharmony_ci * @since 9 344661847f8eSopenharmony_ci */ 344761847f8eSopenharmony_ci /** 344861847f8eSopenharmony_ci * From an existing ImageData object, copy an object with the same width and height as the image. 344961847f8eSopenharmony_ci * The image content is not copied. 345061847f8eSopenharmony_ci * 345161847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be copied. 345261847f8eSopenharmony_ci * @returns { ImageData } 345361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 345461847f8eSopenharmony_ci * @crossplatform 345561847f8eSopenharmony_ci * @form 345661847f8eSopenharmony_ci * @since 10 345761847f8eSopenharmony_ci */ 345861847f8eSopenharmony_ci /** 345961847f8eSopenharmony_ci * From an existing ImageData object, copy an object with the same width and height as the image. 346061847f8eSopenharmony_ci * The image content is not copied. 346161847f8eSopenharmony_ci * 346261847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be copied. 346361847f8eSopenharmony_ci * @returns { ImageData } 346461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 346561847f8eSopenharmony_ci * @crossplatform 346661847f8eSopenharmony_ci * @form 346761847f8eSopenharmony_ci * @atomicservice 346861847f8eSopenharmony_ci * @since 11 346961847f8eSopenharmony_ci */ 347061847f8eSopenharmony_ci createImageData(imagedata: ImageData): ImageData; 347161847f8eSopenharmony_ci 347261847f8eSopenharmony_ci /** 347361847f8eSopenharmony_ci * Obtains the pixel data of a specified area on the current canvas. 347461847f8eSopenharmony_ci * 347561847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted. 347661847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted. 347761847f8eSopenharmony_ci * @param { number } sw - The width of the rectangular area of the image data to be extracted. 347861847f8eSopenharmony_ci * @param { number } sh - The height of the rectangular area of the image data to be extracted. 347961847f8eSopenharmony_ci * @returns { ImageData } 348061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 348161847f8eSopenharmony_ci * @since 8 348261847f8eSopenharmony_ci */ 348361847f8eSopenharmony_ci /** 348461847f8eSopenharmony_ci * Obtains the pixel data of a specified area on the current canvas. 348561847f8eSopenharmony_ci * 348661847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted. 348761847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted. 348861847f8eSopenharmony_ci * @param { number } sw - The width of the rectangular area of the image data to be extracted. 348961847f8eSopenharmony_ci * @param { number } sh - The height of the rectangular area of the image data to be extracted. 349061847f8eSopenharmony_ci * @returns { ImageData } 349161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 349261847f8eSopenharmony_ci * @form 349361847f8eSopenharmony_ci * @since 9 349461847f8eSopenharmony_ci */ 349561847f8eSopenharmony_ci /** 349661847f8eSopenharmony_ci * Obtains the pixel data of a specified area on the current canvas. 349761847f8eSopenharmony_ci * 349861847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted. 349961847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted. 350061847f8eSopenharmony_ci * @param { number } sw - The width of the rectangular area of the image data to be extracted. 350161847f8eSopenharmony_ci * @param { number } sh - The height of the rectangular area of the image data to be extracted. 350261847f8eSopenharmony_ci * @returns { ImageData } 350361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 350461847f8eSopenharmony_ci * @crossplatform 350561847f8eSopenharmony_ci * @form 350661847f8eSopenharmony_ci * @since 10 350761847f8eSopenharmony_ci */ 350861847f8eSopenharmony_ci /** 350961847f8eSopenharmony_ci * Obtains the pixel data of a specified area on the current canvas. 351061847f8eSopenharmony_ci * 351161847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the image data to be extracted. 351261847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the image data to be extracted. 351361847f8eSopenharmony_ci * @param { number } sw - The width of the rectangular area of the image data to be extracted. 351461847f8eSopenharmony_ci * @param { number } sh - The height of the rectangular area of the image data to be extracted. 351561847f8eSopenharmony_ci * @returns { ImageData } 351661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 351761847f8eSopenharmony_ci * @crossplatform 351861847f8eSopenharmony_ci * @form 351961847f8eSopenharmony_ci * @atomicservice 352061847f8eSopenharmony_ci * @since 11 352161847f8eSopenharmony_ci */ 352261847f8eSopenharmony_ci getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; 352361847f8eSopenharmony_ci 352461847f8eSopenharmony_ci /** 352561847f8eSopenharmony_ci * Obtains the PixelMap of a specified area on the current canvas. 352661847f8eSopenharmony_ci * 352761847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted. 352861847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted. 352961847f8eSopenharmony_ci * @param { number } sw - The width of the rectangular area of the PixelMap to be extracted. 353061847f8eSopenharmony_ci * @param { number } sh - The height of the rectangular area of the PixelMap to be extracted. 353161847f8eSopenharmony_ci * @returns { PixelMap } 353261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 353361847f8eSopenharmony_ci * @since 8 353461847f8eSopenharmony_ci */ 353561847f8eSopenharmony_ci /** 353661847f8eSopenharmony_ci * Obtains the PixelMap of a specified area on the current canvas. 353761847f8eSopenharmony_ci * 353861847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted. 353961847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted. 354061847f8eSopenharmony_ci * @param { number } sw - The width of the rectangular area of the PixelMap to be extracted. 354161847f8eSopenharmony_ci * @param { number } sh - The height of the rectangular area of the PixelMap to be extracted. 354261847f8eSopenharmony_ci * @returns { PixelMap } 354361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 354461847f8eSopenharmony_ci * @crossplatform 354561847f8eSopenharmony_ci * @since 10 354661847f8eSopenharmony_ci */ 354761847f8eSopenharmony_ci /** 354861847f8eSopenharmony_ci * Obtains the PixelMap of a specified area on the current canvas. 354961847f8eSopenharmony_ci * 355061847f8eSopenharmony_ci * @param { number } sx - x coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted. 355161847f8eSopenharmony_ci * @param { number } sy - y coordinate of the upper left corner of the rectangular area of the PixelMap to be extracted. 355261847f8eSopenharmony_ci * @param { number } sw - The width of the rectangular area of the PixelMap to be extracted. 355361847f8eSopenharmony_ci * @param { number } sh - The height of the rectangular area of the PixelMap to be extracted. 355461847f8eSopenharmony_ci * @returns { PixelMap } 355561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 355661847f8eSopenharmony_ci * @crossplatform 355761847f8eSopenharmony_ci * @atomicservice 355861847f8eSopenharmony_ci * @since 11 355961847f8eSopenharmony_ci */ 356061847f8eSopenharmony_ci getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap; 356161847f8eSopenharmony_ci 356261847f8eSopenharmony_ci /** 356361847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 356461847f8eSopenharmony_ci * 356561847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 356661847f8eSopenharmony_ci * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 356761847f8eSopenharmony_ci * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 356861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 356961847f8eSopenharmony_ci * @since 8 357061847f8eSopenharmony_ci */ 357161847f8eSopenharmony_ci /** 357261847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 357361847f8eSopenharmony_ci * 357461847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 357561847f8eSopenharmony_ci * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 357661847f8eSopenharmony_ci * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 357761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 357861847f8eSopenharmony_ci * @form 357961847f8eSopenharmony_ci * @since 9 358061847f8eSopenharmony_ci */ 358161847f8eSopenharmony_ci /** 358261847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 358361847f8eSopenharmony_ci * 358461847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 358561847f8eSopenharmony_ci * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 358661847f8eSopenharmony_ci * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 358761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 358861847f8eSopenharmony_ci * @crossplatform 358961847f8eSopenharmony_ci * @form 359061847f8eSopenharmony_ci * @since 10 359161847f8eSopenharmony_ci */ 359261847f8eSopenharmony_ci /** 359361847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 359461847f8eSopenharmony_ci * 359561847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 359661847f8eSopenharmony_ci * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 359761847f8eSopenharmony_ci * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 359861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 359961847f8eSopenharmony_ci * @crossplatform 360061847f8eSopenharmony_ci * @form 360161847f8eSopenharmony_ci * @atomicservice 360261847f8eSopenharmony_ci * @since 11 360361847f8eSopenharmony_ci */ 360461847f8eSopenharmony_ci putImageData(imagedata: ImageData, dx: number | string, dy: number | string): void; 360561847f8eSopenharmony_ci 360661847f8eSopenharmony_ci /** 360761847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 360861847f8eSopenharmony_ci * 360961847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 361061847f8eSopenharmony_ci * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 361161847f8eSopenharmony_ci * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 361261847f8eSopenharmony_ci * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data. 361361847f8eSopenharmony_ci * The default is the upper left corner (x coordinate) of the entire image data. 361461847f8eSopenharmony_ci * @param { number } dirtyY - Position of the upper left corner of the rectangular area in the source image data. 361561847f8eSopenharmony_ci * The default is the upper left corner (y coordinate) of the entire image data. 361661847f8eSopenharmony_ci * @param { number } dirtyWidth - Width of the rectangular area in the source image data. 361761847f8eSopenharmony_ci * The default is the width of the image data. 361861847f8eSopenharmony_ci * @param { number } dirtyHeight - Height of the rectangular area in the source image data. 361961847f8eSopenharmony_ci * The default is the height of the image data. 362061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 362161847f8eSopenharmony_ci * @since 8 362261847f8eSopenharmony_ci */ 362361847f8eSopenharmony_ci /** 362461847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 362561847f8eSopenharmony_ci * 362661847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 362761847f8eSopenharmony_ci * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 362861847f8eSopenharmony_ci * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 362961847f8eSopenharmony_ci * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data. 363061847f8eSopenharmony_ci * The default is the upper left corner (x coordinate) of the entire image data. 363161847f8eSopenharmony_ci * @param { number } dirtyY - Position of the upper left corner of the rectangular area in the source image data. 363261847f8eSopenharmony_ci * The default is the upper left corner (y coordinate) of the entire image data. 363361847f8eSopenharmony_ci * @param { number } dirtyWidth - Width of the rectangular area in the source image data. 363461847f8eSopenharmony_ci * The default is the width of the image data. 363561847f8eSopenharmony_ci * @param { number } dirtyHeight - Height of the rectangular area in the source image data. 363661847f8eSopenharmony_ci * The default is the height of the image data. 363761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 363861847f8eSopenharmony_ci * @form 363961847f8eSopenharmony_ci * @since 9 364061847f8eSopenharmony_ci */ 364161847f8eSopenharmony_ci /** 364261847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 364361847f8eSopenharmony_ci * 364461847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 364561847f8eSopenharmony_ci * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 364661847f8eSopenharmony_ci * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 364761847f8eSopenharmony_ci * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data. 364861847f8eSopenharmony_ci * The default is the upper left corner (x coordinate) of the entire image data. 364961847f8eSopenharmony_ci * @param { number | string } dirtyY - Position of the upper left corner of the rectangular area in the source image data. 365061847f8eSopenharmony_ci * The default is the upper left corner (y coordinate) of the entire image data. 365161847f8eSopenharmony_ci * @param { number | string } dirtyWidth - Width of the rectangular area in the source image data. 365261847f8eSopenharmony_ci * The default is the width of the image data. 365361847f8eSopenharmony_ci * @param { number | string } dirtyHeight - Height of the rectangular area in the source image data. 365461847f8eSopenharmony_ci * The default is the height of the image data. 365561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 365661847f8eSopenharmony_ci * @crossplatform 365761847f8eSopenharmony_ci * @form 365861847f8eSopenharmony_ci * @since 10 365961847f8eSopenharmony_ci */ 366061847f8eSopenharmony_ci /** 366161847f8eSopenharmony_ci * Draws the specified ImageData object onto the canvas 366261847f8eSopenharmony_ci * 366361847f8eSopenharmony_ci * @param { ImageData } imagedata - ImageData object to be drawn. 366461847f8eSopenharmony_ci * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). 366561847f8eSopenharmony_ci * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). 366661847f8eSopenharmony_ci * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data. 366761847f8eSopenharmony_ci * The default is the upper left corner (x coordinate) of the entire image data. 366861847f8eSopenharmony_ci * @param { number | string } dirtyY - Position of the upper left corner of the rectangular area in the source image data. 366961847f8eSopenharmony_ci * The default is the upper left corner (y coordinate) of the entire image data. 367061847f8eSopenharmony_ci * @param { number | string } dirtyWidth - Width of the rectangular area in the source image data. 367161847f8eSopenharmony_ci * The default is the width of the image data. 367261847f8eSopenharmony_ci * @param { number | string } dirtyHeight - Height of the rectangular area in the source image data. 367361847f8eSopenharmony_ci * The default is the height of the image data. 367461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 367561847f8eSopenharmony_ci * @crossplatform 367661847f8eSopenharmony_ci * @form 367761847f8eSopenharmony_ci * @atomicservice 367861847f8eSopenharmony_ci * @since 11 367961847f8eSopenharmony_ci */ 368061847f8eSopenharmony_ci putImageData( 368161847f8eSopenharmony_ci imagedata: ImageData, 368261847f8eSopenharmony_ci dx: number | string, 368361847f8eSopenharmony_ci dy: number | string, 368461847f8eSopenharmony_ci dirtyX: number | string, 368561847f8eSopenharmony_ci dirtyY: number | string, 368661847f8eSopenharmony_ci dirtyWidth: number | string, 368761847f8eSopenharmony_ci dirtyHeight: number | string 368861847f8eSopenharmony_ci ): void; 368961847f8eSopenharmony_ci 369061847f8eSopenharmony_ci /** 369161847f8eSopenharmony_ci * Specifies whether to smooth the image. The value true indicates that the image is smooth. 369261847f8eSopenharmony_ci * The value false indicates that the image is not smooth. 369361847f8eSopenharmony_ci * 369461847f8eSopenharmony_ci * @type { boolean } 369561847f8eSopenharmony_ci * @default true 369661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 369761847f8eSopenharmony_ci * @since 8 369861847f8eSopenharmony_ci */ 369961847f8eSopenharmony_ci /** 370061847f8eSopenharmony_ci * Specifies whether to smooth the image. The value true indicates that the image is smooth. 370161847f8eSopenharmony_ci * The value false indicates that the image is not smooth. 370261847f8eSopenharmony_ci * 370361847f8eSopenharmony_ci * @type { boolean } 370461847f8eSopenharmony_ci * @default true 370561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 370661847f8eSopenharmony_ci * @form 370761847f8eSopenharmony_ci * @since 9 370861847f8eSopenharmony_ci */ 370961847f8eSopenharmony_ci /** 371061847f8eSopenharmony_ci * Specifies whether to smooth the image. The value true indicates that the image is smooth. 371161847f8eSopenharmony_ci * The value false indicates that the image is not smooth. 371261847f8eSopenharmony_ci * 371361847f8eSopenharmony_ci * @type { boolean } 371461847f8eSopenharmony_ci * @default true 371561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 371661847f8eSopenharmony_ci * @crossplatform 371761847f8eSopenharmony_ci * @form 371861847f8eSopenharmony_ci * @since 10 371961847f8eSopenharmony_ci */ 372061847f8eSopenharmony_ci /** 372161847f8eSopenharmony_ci * Specifies whether to smooth the image. The value true indicates that the image is smooth. 372261847f8eSopenharmony_ci * The value false indicates that the image is not smooth. 372361847f8eSopenharmony_ci * 372461847f8eSopenharmony_ci * @type { boolean } 372561847f8eSopenharmony_ci * @default true 372661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 372761847f8eSopenharmony_ci * @crossplatform 372861847f8eSopenharmony_ci * @form 372961847f8eSopenharmony_ci * @atomicservice 373061847f8eSopenharmony_ci * @since 11 373161847f8eSopenharmony_ci */ 373261847f8eSopenharmony_ci imageSmoothingEnabled: boolean; 373361847f8eSopenharmony_ci 373461847f8eSopenharmony_ci /** 373561847f8eSopenharmony_ci * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. 373661847f8eSopenharmony_ci * 373761847f8eSopenharmony_ci * @type { ImageSmoothingQuality } 373861847f8eSopenharmony_ci * @default low 373961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 374061847f8eSopenharmony_ci * @since 8 374161847f8eSopenharmony_ci */ 374261847f8eSopenharmony_ci /** 374361847f8eSopenharmony_ci * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. 374461847f8eSopenharmony_ci * 374561847f8eSopenharmony_ci * @type { ImageSmoothingQuality } 374661847f8eSopenharmony_ci * @default low 374761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 374861847f8eSopenharmony_ci * @form 374961847f8eSopenharmony_ci * @since 9 375061847f8eSopenharmony_ci */ 375161847f8eSopenharmony_ci /** 375261847f8eSopenharmony_ci * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. 375361847f8eSopenharmony_ci * 375461847f8eSopenharmony_ci * @type { ImageSmoothingQuality } 375561847f8eSopenharmony_ci * @default low 375661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 375761847f8eSopenharmony_ci * @crossplatform 375861847f8eSopenharmony_ci * @form 375961847f8eSopenharmony_ci * @since 10 376061847f8eSopenharmony_ci */ 376161847f8eSopenharmony_ci /** 376261847f8eSopenharmony_ci * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. 376361847f8eSopenharmony_ci * 376461847f8eSopenharmony_ci * @type { ImageSmoothingQuality } 376561847f8eSopenharmony_ci * @default low 376661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 376761847f8eSopenharmony_ci * @crossplatform 376861847f8eSopenharmony_ci * @form 376961847f8eSopenharmony_ci * @atomicservice 377061847f8eSopenharmony_ci * @since 11 377161847f8eSopenharmony_ci */ 377261847f8eSopenharmony_ci imageSmoothingQuality: ImageSmoothingQuality; 377361847f8eSopenharmony_ci 377461847f8eSopenharmony_ci /** 377561847f8eSopenharmony_ci * Line segment endpoint attribute. For details, see {@link CanvasLineCap}. 377661847f8eSopenharmony_ci * 377761847f8eSopenharmony_ci * @type { CanvasLineCap } 377861847f8eSopenharmony_ci * @default butt 377961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 378061847f8eSopenharmony_ci * @since 8 378161847f8eSopenharmony_ci */ 378261847f8eSopenharmony_ci /** 378361847f8eSopenharmony_ci * Line segment endpoint attribute. For details, see {@link CanvasLineCap}. 378461847f8eSopenharmony_ci * 378561847f8eSopenharmony_ci * @type { CanvasLineCap } 378661847f8eSopenharmony_ci * @default butt 378761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 378861847f8eSopenharmony_ci * @form 378961847f8eSopenharmony_ci * @since 9 379061847f8eSopenharmony_ci */ 379161847f8eSopenharmony_ci /** 379261847f8eSopenharmony_ci * Line segment endpoint attribute. For details, see {@link CanvasLineCap}. 379361847f8eSopenharmony_ci * 379461847f8eSopenharmony_ci * @type { CanvasLineCap } 379561847f8eSopenharmony_ci * @default butt 379661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 379761847f8eSopenharmony_ci * @crossplatform 379861847f8eSopenharmony_ci * @form 379961847f8eSopenharmony_ci * @since 10 380061847f8eSopenharmony_ci */ 380161847f8eSopenharmony_ci /** 380261847f8eSopenharmony_ci * Line segment endpoint attribute. For details, see {@link CanvasLineCap}. 380361847f8eSopenharmony_ci * 380461847f8eSopenharmony_ci * @type { CanvasLineCap } 380561847f8eSopenharmony_ci * @default butt 380661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 380761847f8eSopenharmony_ci * @crossplatform 380861847f8eSopenharmony_ci * @form 380961847f8eSopenharmony_ci * @atomicservice 381061847f8eSopenharmony_ci * @since 11 381161847f8eSopenharmony_ci */ 381261847f8eSopenharmony_ci lineCap: CanvasLineCap; 381361847f8eSopenharmony_ci 381461847f8eSopenharmony_ci /** 381561847f8eSopenharmony_ci * Dotted line offset attribute. 381661847f8eSopenharmony_ci * 381761847f8eSopenharmony_ci * @type { number } 381861847f8eSopenharmony_ci * @default 0.0 381961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 382061847f8eSopenharmony_ci * @since 8 382161847f8eSopenharmony_ci */ 382261847f8eSopenharmony_ci /** 382361847f8eSopenharmony_ci * Dotted line offset attribute. 382461847f8eSopenharmony_ci * 382561847f8eSopenharmony_ci * @type { number } 382661847f8eSopenharmony_ci * @default 0.0 382761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 382861847f8eSopenharmony_ci * @form 382961847f8eSopenharmony_ci * @since 9 383061847f8eSopenharmony_ci */ 383161847f8eSopenharmony_ci /** 383261847f8eSopenharmony_ci * Dotted line offset attribute. 383361847f8eSopenharmony_ci * 383461847f8eSopenharmony_ci * @type { number } 383561847f8eSopenharmony_ci * @default 0.0 383661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 383761847f8eSopenharmony_ci * @crossplatform 383861847f8eSopenharmony_ci * @form 383961847f8eSopenharmony_ci * @since 10 384061847f8eSopenharmony_ci */ 384161847f8eSopenharmony_ci /** 384261847f8eSopenharmony_ci * Dotted line offset attribute. 384361847f8eSopenharmony_ci * 384461847f8eSopenharmony_ci * @type { number } 384561847f8eSopenharmony_ci * @default 0.0 384661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 384761847f8eSopenharmony_ci * @crossplatform 384861847f8eSopenharmony_ci * @form 384961847f8eSopenharmony_ci * @atomicservice 385061847f8eSopenharmony_ci * @since 11 385161847f8eSopenharmony_ci */ 385261847f8eSopenharmony_ci lineDashOffset: number; 385361847f8eSopenharmony_ci 385461847f8eSopenharmony_ci /** 385561847f8eSopenharmony_ci * Line segment connection point attribute. For details, see {@link CanvasLineJoin}. 385661847f8eSopenharmony_ci * 385761847f8eSopenharmony_ci * @type { CanvasLineJoin } 385861847f8eSopenharmony_ci * @default miter 385961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 386061847f8eSopenharmony_ci * @since 8 386161847f8eSopenharmony_ci */ 386261847f8eSopenharmony_ci /** 386361847f8eSopenharmony_ci * Line segment connection point attribute. For details, see {@link CanvasLineJoin}. 386461847f8eSopenharmony_ci * 386561847f8eSopenharmony_ci * @type { CanvasLineJoin } 386661847f8eSopenharmony_ci * @default miter 386761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 386861847f8eSopenharmony_ci * @form 386961847f8eSopenharmony_ci * @since 9 387061847f8eSopenharmony_ci */ 387161847f8eSopenharmony_ci /** 387261847f8eSopenharmony_ci * Line segment connection point attribute. For details, see {@link CanvasLineJoin}. 387361847f8eSopenharmony_ci * 387461847f8eSopenharmony_ci * @type { CanvasLineJoin } 387561847f8eSopenharmony_ci * @default miter 387661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 387761847f8eSopenharmony_ci * @crossplatform 387861847f8eSopenharmony_ci * @form 387961847f8eSopenharmony_ci * @since 10 388061847f8eSopenharmony_ci */ 388161847f8eSopenharmony_ci /** 388261847f8eSopenharmony_ci * Line segment connection point attribute. For details, see {@link CanvasLineJoin}. 388361847f8eSopenharmony_ci * 388461847f8eSopenharmony_ci * @type { CanvasLineJoin } 388561847f8eSopenharmony_ci * @default miter 388661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 388761847f8eSopenharmony_ci * @crossplatform 388861847f8eSopenharmony_ci * @form 388961847f8eSopenharmony_ci * @atomicservice 389061847f8eSopenharmony_ci * @since 11 389161847f8eSopenharmony_ci */ 389261847f8eSopenharmony_ci lineJoin: CanvasLineJoin; 389361847f8eSopenharmony_ci 389461847f8eSopenharmony_ci /** 389561847f8eSopenharmony_ci * Line thickness attribute. The value cannot be 0 or a negative number. 389661847f8eSopenharmony_ci * 389761847f8eSopenharmony_ci * @type { number } 389861847f8eSopenharmony_ci * @default 1(px) 389961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 390061847f8eSopenharmony_ci * @since 8 390161847f8eSopenharmony_ci */ 390261847f8eSopenharmony_ci /** 390361847f8eSopenharmony_ci * Line thickness attribute. The value cannot be 0 or a negative number. 390461847f8eSopenharmony_ci * 390561847f8eSopenharmony_ci * @type { number } 390661847f8eSopenharmony_ci * @default 1(px) 390761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 390861847f8eSopenharmony_ci * @form 390961847f8eSopenharmony_ci * @since 9 391061847f8eSopenharmony_ci */ 391161847f8eSopenharmony_ci /** 391261847f8eSopenharmony_ci * Line thickness attribute. The value cannot be 0 or a negative number. 391361847f8eSopenharmony_ci * 391461847f8eSopenharmony_ci * @type { number } 391561847f8eSopenharmony_ci * @default 1(px) 391661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 391761847f8eSopenharmony_ci * @crossplatform 391861847f8eSopenharmony_ci * @form 391961847f8eSopenharmony_ci * @since 10 392061847f8eSopenharmony_ci */ 392161847f8eSopenharmony_ci /** 392261847f8eSopenharmony_ci * Line thickness attribute. The value cannot be 0 or a negative number. 392361847f8eSopenharmony_ci * 392461847f8eSopenharmony_ci * @type { number } 392561847f8eSopenharmony_ci * @default 1(px) 392661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 392761847f8eSopenharmony_ci * @crossplatform 392861847f8eSopenharmony_ci * @form 392961847f8eSopenharmony_ci * @atomicservice 393061847f8eSopenharmony_ci * @since 11 393161847f8eSopenharmony_ci */ 393261847f8eSopenharmony_ci lineWidth: number; 393361847f8eSopenharmony_ci 393461847f8eSopenharmony_ci /** 393561847f8eSopenharmony_ci * The value of this parameter cannot be 0 or a negative number. 393661847f8eSopenharmony_ci * 393761847f8eSopenharmony_ci * @type { number } 393861847f8eSopenharmony_ci * @default 10(px) 393961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 394061847f8eSopenharmony_ci * @since 8 394161847f8eSopenharmony_ci */ 394261847f8eSopenharmony_ci /** 394361847f8eSopenharmony_ci * The value of this parameter cannot be 0 or a negative number. 394461847f8eSopenharmony_ci * 394561847f8eSopenharmony_ci * @type { number } 394661847f8eSopenharmony_ci * @default 10(px) 394761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 394861847f8eSopenharmony_ci * @form 394961847f8eSopenharmony_ci * @since 9 395061847f8eSopenharmony_ci */ 395161847f8eSopenharmony_ci /** 395261847f8eSopenharmony_ci * The value of this parameter cannot be 0 or a negative number. 395361847f8eSopenharmony_ci * 395461847f8eSopenharmony_ci * @type { number } 395561847f8eSopenharmony_ci * @default 10(px) 395661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 395761847f8eSopenharmony_ci * @crossplatform 395861847f8eSopenharmony_ci * @form 395961847f8eSopenharmony_ci * @since 10 396061847f8eSopenharmony_ci */ 396161847f8eSopenharmony_ci /** 396261847f8eSopenharmony_ci * The value of this parameter cannot be 0 or a negative number. 396361847f8eSopenharmony_ci * 396461847f8eSopenharmony_ci * @type { number } 396561847f8eSopenharmony_ci * @default 10(px) 396661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 396761847f8eSopenharmony_ci * @crossplatform 396861847f8eSopenharmony_ci * @form 396961847f8eSopenharmony_ci * @atomicservice 397061847f8eSopenharmony_ci * @since 11 397161847f8eSopenharmony_ci */ 397261847f8eSopenharmony_ci miterLimit: number; 397361847f8eSopenharmony_ci 397461847f8eSopenharmony_ci /** 397561847f8eSopenharmony_ci * Gets the current segment style. 397661847f8eSopenharmony_ci * 397761847f8eSopenharmony_ci * @returns { number[] } 397861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 397961847f8eSopenharmony_ci * @since 8 398061847f8eSopenharmony_ci */ 398161847f8eSopenharmony_ci /** 398261847f8eSopenharmony_ci * Gets the current segment style. 398361847f8eSopenharmony_ci * 398461847f8eSopenharmony_ci * @returns { number[] } 398561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 398661847f8eSopenharmony_ci * @form 398761847f8eSopenharmony_ci * @since 9 398861847f8eSopenharmony_ci */ 398961847f8eSopenharmony_ci /** 399061847f8eSopenharmony_ci * Gets the current segment style. 399161847f8eSopenharmony_ci * 399261847f8eSopenharmony_ci * @returns { number[] } 399361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 399461847f8eSopenharmony_ci * @crossplatform 399561847f8eSopenharmony_ci * @form 399661847f8eSopenharmony_ci * @since 10 399761847f8eSopenharmony_ci */ 399861847f8eSopenharmony_ci /** 399961847f8eSopenharmony_ci * Gets the current segment style. 400061847f8eSopenharmony_ci * 400161847f8eSopenharmony_ci * @returns { number[] } 400261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 400361847f8eSopenharmony_ci * @crossplatform 400461847f8eSopenharmony_ci * @form 400561847f8eSopenharmony_ci * @atomicservice 400661847f8eSopenharmony_ci * @since 11 400761847f8eSopenharmony_ci */ 400861847f8eSopenharmony_ci getLineDash(): number[]; 400961847f8eSopenharmony_ci 401061847f8eSopenharmony_ci /** 401161847f8eSopenharmony_ci * Sets the dashed line mode for line drawing. 401261847f8eSopenharmony_ci * 401361847f8eSopenharmony_ci * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and 401461847f8eSopenharmony_ci * spacing (coordinate space units). 401561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 401661847f8eSopenharmony_ci * @since 8 401761847f8eSopenharmony_ci */ 401861847f8eSopenharmony_ci /** 401961847f8eSopenharmony_ci * Sets the dashed line mode for line drawing. 402061847f8eSopenharmony_ci * 402161847f8eSopenharmony_ci * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and 402261847f8eSopenharmony_ci * spacing (coordinate space units). 402361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 402461847f8eSopenharmony_ci * @form 402561847f8eSopenharmony_ci * @since 9 402661847f8eSopenharmony_ci */ 402761847f8eSopenharmony_ci /** 402861847f8eSopenharmony_ci * Sets the dashed line mode for line drawing. 402961847f8eSopenharmony_ci * 403061847f8eSopenharmony_ci * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and 403161847f8eSopenharmony_ci * spacing (coordinate space units). 403261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 403361847f8eSopenharmony_ci * @crossplatform 403461847f8eSopenharmony_ci * @form 403561847f8eSopenharmony_ci * @since 10 403661847f8eSopenharmony_ci */ 403761847f8eSopenharmony_ci /** 403861847f8eSopenharmony_ci * Sets the dashed line mode for line drawing. 403961847f8eSopenharmony_ci * 404061847f8eSopenharmony_ci * @param { number[] } segments - A set of numbers that describe the length of alternating drawn lines segments and 404161847f8eSopenharmony_ci * spacing (coordinate space units). 404261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 404361847f8eSopenharmony_ci * @crossplatform 404461847f8eSopenharmony_ci * @form 404561847f8eSopenharmony_ci * @atomicservice 404661847f8eSopenharmony_ci * @since 11 404761847f8eSopenharmony_ci */ 404861847f8eSopenharmony_ci setLineDash(segments: number[]): void; 404961847f8eSopenharmony_ci 405061847f8eSopenharmony_ci /** 405161847f8eSopenharmony_ci * Clears the drawing content of a rectangular area. 405261847f8eSopenharmony_ci * 405361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 405461847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 405561847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 405661847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 405761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 405861847f8eSopenharmony_ci * @since 8 405961847f8eSopenharmony_ci */ 406061847f8eSopenharmony_ci /** 406161847f8eSopenharmony_ci * Clears the drawing content of a rectangular area. 406261847f8eSopenharmony_ci * 406361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 406461847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 406561847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 406661847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 406761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 406861847f8eSopenharmony_ci * @form 406961847f8eSopenharmony_ci * @since 9 407061847f8eSopenharmony_ci */ 407161847f8eSopenharmony_ci /** 407261847f8eSopenharmony_ci * Clears the drawing content of a rectangular area. 407361847f8eSopenharmony_ci * 407461847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 407561847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 407661847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 407761847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 407861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 407961847f8eSopenharmony_ci * @crossplatform 408061847f8eSopenharmony_ci * @form 408161847f8eSopenharmony_ci * @since 10 408261847f8eSopenharmony_ci */ 408361847f8eSopenharmony_ci /** 408461847f8eSopenharmony_ci * Clears the drawing content of a rectangular area. 408561847f8eSopenharmony_ci * 408661847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 408761847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 408861847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 408961847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 409061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 409161847f8eSopenharmony_ci * @crossplatform 409261847f8eSopenharmony_ci * @form 409361847f8eSopenharmony_ci * @atomicservice 409461847f8eSopenharmony_ci * @since 11 409561847f8eSopenharmony_ci */ 409661847f8eSopenharmony_ci clearRect(x: number, y: number, w: number, h: number): void; 409761847f8eSopenharmony_ci 409861847f8eSopenharmony_ci /** 409961847f8eSopenharmony_ci * Fills a specified rectangular area 410061847f8eSopenharmony_ci * 410161847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 410261847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 410361847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 410461847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 410561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 410661847f8eSopenharmony_ci * @since 8 410761847f8eSopenharmony_ci */ 410861847f8eSopenharmony_ci /** 410961847f8eSopenharmony_ci * Fills a specified rectangular area 411061847f8eSopenharmony_ci * 411161847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 411261847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 411361847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 411461847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 411561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 411661847f8eSopenharmony_ci * @form 411761847f8eSopenharmony_ci * @since 9 411861847f8eSopenharmony_ci */ 411961847f8eSopenharmony_ci /** 412061847f8eSopenharmony_ci * Fills a specified rectangular area 412161847f8eSopenharmony_ci * 412261847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 412361847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 412461847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 412561847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 412661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 412761847f8eSopenharmony_ci * @crossplatform 412861847f8eSopenharmony_ci * @form 412961847f8eSopenharmony_ci * @since 10 413061847f8eSopenharmony_ci */ 413161847f8eSopenharmony_ci /** 413261847f8eSopenharmony_ci * Fills a specified rectangular area 413361847f8eSopenharmony_ci * 413461847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 413561847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 413661847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 413761847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 413861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 413961847f8eSopenharmony_ci * @crossplatform 414061847f8eSopenharmony_ci * @form 414161847f8eSopenharmony_ci * @atomicservice 414261847f8eSopenharmony_ci * @since 11 414361847f8eSopenharmony_ci */ 414461847f8eSopenharmony_ci fillRect(x: number, y: number, w: number, h: number): void; 414561847f8eSopenharmony_ci 414661847f8eSopenharmony_ci /** 414761847f8eSopenharmony_ci * Stroke Specify Rectangular Area 414861847f8eSopenharmony_ci * 414961847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 415061847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 415161847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 415261847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 415361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 415461847f8eSopenharmony_ci * @since 8 415561847f8eSopenharmony_ci */ 415661847f8eSopenharmony_ci /** 415761847f8eSopenharmony_ci * Stroke Specify Rectangular Area 415861847f8eSopenharmony_ci * 415961847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 416061847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 416161847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 416261847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 416361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 416461847f8eSopenharmony_ci * @form 416561847f8eSopenharmony_ci * @since 9 416661847f8eSopenharmony_ci */ 416761847f8eSopenharmony_ci /** 416861847f8eSopenharmony_ci * Stroke Specify Rectangular Area 416961847f8eSopenharmony_ci * 417061847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 417161847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 417261847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 417361847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 417461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 417561847f8eSopenharmony_ci * @crossplatform 417661847f8eSopenharmony_ci * @form 417761847f8eSopenharmony_ci * @since 10 417861847f8eSopenharmony_ci */ 417961847f8eSopenharmony_ci /** 418061847f8eSopenharmony_ci * Stroke Specify Rectangular Area 418161847f8eSopenharmony_ci * 418261847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the rectangle. 418361847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the rectangle. 418461847f8eSopenharmony_ci * @param { number } w - Width of the rectangle. 418561847f8eSopenharmony_ci * @param { number } h - Height of the rectangle. 418661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 418761847f8eSopenharmony_ci * @crossplatform 418861847f8eSopenharmony_ci * @form 418961847f8eSopenharmony_ci * @atomicservice 419061847f8eSopenharmony_ci * @since 11 419161847f8eSopenharmony_ci */ 419261847f8eSopenharmony_ci strokeRect(x: number, y: number, w: number, h: number): void; 419361847f8eSopenharmony_ci 419461847f8eSopenharmony_ci /** 419561847f8eSopenharmony_ci * Shadow blur radius. The value cannot be a negative number. 419661847f8eSopenharmony_ci * 419761847f8eSopenharmony_ci * @type { number } 419861847f8eSopenharmony_ci * @default 0 419961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 420061847f8eSopenharmony_ci * @since 8 420161847f8eSopenharmony_ci */ 420261847f8eSopenharmony_ci /** 420361847f8eSopenharmony_ci * Shadow blur radius. The value cannot be a negative number. 420461847f8eSopenharmony_ci * 420561847f8eSopenharmony_ci * @type { number } 420661847f8eSopenharmony_ci * @default 0 420761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 420861847f8eSopenharmony_ci * @form 420961847f8eSopenharmony_ci * @since 9 421061847f8eSopenharmony_ci */ 421161847f8eSopenharmony_ci /** 421261847f8eSopenharmony_ci * Shadow blur radius. The value cannot be a negative number. 421361847f8eSopenharmony_ci * 421461847f8eSopenharmony_ci * @type { number } 421561847f8eSopenharmony_ci * @default 0 421661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 421761847f8eSopenharmony_ci * @crossplatform 421861847f8eSopenharmony_ci * @form 421961847f8eSopenharmony_ci * @since 10 422061847f8eSopenharmony_ci */ 422161847f8eSopenharmony_ci /** 422261847f8eSopenharmony_ci * Shadow blur radius. The value cannot be a negative number. 422361847f8eSopenharmony_ci * 422461847f8eSopenharmony_ci * @type { number } 422561847f8eSopenharmony_ci * @default 0 422661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 422761847f8eSopenharmony_ci * @crossplatform 422861847f8eSopenharmony_ci * @form 422961847f8eSopenharmony_ci * @atomicservice 423061847f8eSopenharmony_ci * @since 11 423161847f8eSopenharmony_ci */ 423261847f8eSopenharmony_ci shadowBlur: number; 423361847f8eSopenharmony_ci 423461847f8eSopenharmony_ci /** 423561847f8eSopenharmony_ci * Shadow color. 423661847f8eSopenharmony_ci * 423761847f8eSopenharmony_ci * @type { string } 423861847f8eSopenharmony_ci * @default transparent black 423961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 424061847f8eSopenharmony_ci * @since 8 424161847f8eSopenharmony_ci */ 424261847f8eSopenharmony_ci /** 424361847f8eSopenharmony_ci * Shadow color. 424461847f8eSopenharmony_ci * 424561847f8eSopenharmony_ci * @type { string } 424661847f8eSopenharmony_ci * @default transparent black 424761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 424861847f8eSopenharmony_ci * @form 424961847f8eSopenharmony_ci * @since 9 425061847f8eSopenharmony_ci */ 425161847f8eSopenharmony_ci /** 425261847f8eSopenharmony_ci * Shadow color. 425361847f8eSopenharmony_ci * 425461847f8eSopenharmony_ci * @type { string } 425561847f8eSopenharmony_ci * @default transparent black 425661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 425761847f8eSopenharmony_ci * @crossplatform 425861847f8eSopenharmony_ci * @form 425961847f8eSopenharmony_ci * @since 10 426061847f8eSopenharmony_ci */ 426161847f8eSopenharmony_ci /** 426261847f8eSopenharmony_ci * Shadow color. 426361847f8eSopenharmony_ci * 426461847f8eSopenharmony_ci * @type { string } 426561847f8eSopenharmony_ci * @default transparent black 426661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 426761847f8eSopenharmony_ci * @crossplatform 426861847f8eSopenharmony_ci * @form 426961847f8eSopenharmony_ci * @atomicservice 427061847f8eSopenharmony_ci * @since 11 427161847f8eSopenharmony_ci */ 427261847f8eSopenharmony_ci shadowColor: string; 427361847f8eSopenharmony_ci 427461847f8eSopenharmony_ci /** 427561847f8eSopenharmony_ci * Horizontal offset distance of the shadow. 427661847f8eSopenharmony_ci * 427761847f8eSopenharmony_ci * @type { number } 427861847f8eSopenharmony_ci * @default 0 427961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 428061847f8eSopenharmony_ci * @since 8 428161847f8eSopenharmony_ci */ 428261847f8eSopenharmony_ci /** 428361847f8eSopenharmony_ci * Horizontal offset distance of the shadow. 428461847f8eSopenharmony_ci * 428561847f8eSopenharmony_ci * @type { number } 428661847f8eSopenharmony_ci * @default 0 428761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 428861847f8eSopenharmony_ci * @form 428961847f8eSopenharmony_ci * @since 9 429061847f8eSopenharmony_ci */ 429161847f8eSopenharmony_ci /** 429261847f8eSopenharmony_ci * Horizontal offset distance of the shadow. 429361847f8eSopenharmony_ci * 429461847f8eSopenharmony_ci * @type { number } 429561847f8eSopenharmony_ci * @default 0 429661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 429761847f8eSopenharmony_ci * @crossplatform 429861847f8eSopenharmony_ci * @form 429961847f8eSopenharmony_ci * @since 10 430061847f8eSopenharmony_ci */ 430161847f8eSopenharmony_ci /** 430261847f8eSopenharmony_ci * Horizontal offset distance of the shadow. 430361847f8eSopenharmony_ci * 430461847f8eSopenharmony_ci * @type { number } 430561847f8eSopenharmony_ci * @default 0 430661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 430761847f8eSopenharmony_ci * @crossplatform 430861847f8eSopenharmony_ci * @form 430961847f8eSopenharmony_ci * @atomicservice 431061847f8eSopenharmony_ci * @since 11 431161847f8eSopenharmony_ci */ 431261847f8eSopenharmony_ci shadowOffsetX: number; 431361847f8eSopenharmony_ci 431461847f8eSopenharmony_ci /** 431561847f8eSopenharmony_ci * Vertical offset distance of the shadow. 431661847f8eSopenharmony_ci * 431761847f8eSopenharmony_ci * @type { number } 431861847f8eSopenharmony_ci * @default 0 431961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 432061847f8eSopenharmony_ci * @since 8 432161847f8eSopenharmony_ci */ 432261847f8eSopenharmony_ci /** 432361847f8eSopenharmony_ci * Vertical offset distance of the shadow. 432461847f8eSopenharmony_ci * 432561847f8eSopenharmony_ci * @type { number } 432661847f8eSopenharmony_ci * @default 0 432761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 432861847f8eSopenharmony_ci * @form 432961847f8eSopenharmony_ci * @since 9 433061847f8eSopenharmony_ci */ 433161847f8eSopenharmony_ci /** 433261847f8eSopenharmony_ci * Vertical offset distance of the shadow. 433361847f8eSopenharmony_ci * 433461847f8eSopenharmony_ci * @type { number } 433561847f8eSopenharmony_ci * @default 0 433661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 433761847f8eSopenharmony_ci * @crossplatform 433861847f8eSopenharmony_ci * @form 433961847f8eSopenharmony_ci * @since 10 434061847f8eSopenharmony_ci */ 434161847f8eSopenharmony_ci /** 434261847f8eSopenharmony_ci * Vertical offset distance of the shadow. 434361847f8eSopenharmony_ci * 434461847f8eSopenharmony_ci * @type { number } 434561847f8eSopenharmony_ci * @default 0 434661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 434761847f8eSopenharmony_ci * @crossplatform 434861847f8eSopenharmony_ci * @form 434961847f8eSopenharmony_ci * @atomicservice 435061847f8eSopenharmony_ci * @since 11 435161847f8eSopenharmony_ci */ 435261847f8eSopenharmony_ci shadowOffsetY: number; 435361847f8eSopenharmony_ci 435461847f8eSopenharmony_ci /** 435561847f8eSopenharmony_ci * Top of the stack pop-up state in the drawing state stack 435661847f8eSopenharmony_ci * 435761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 435861847f8eSopenharmony_ci * @since 8 435961847f8eSopenharmony_ci */ 436061847f8eSopenharmony_ci /** 436161847f8eSopenharmony_ci * Top of the stack pop-up state in the drawing state stack 436261847f8eSopenharmony_ci * 436361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 436461847f8eSopenharmony_ci * @form 436561847f8eSopenharmony_ci * @since 9 436661847f8eSopenharmony_ci */ 436761847f8eSopenharmony_ci /** 436861847f8eSopenharmony_ci * Top of the stack pop-up state in the drawing state stack 436961847f8eSopenharmony_ci * 437061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 437161847f8eSopenharmony_ci * @crossplatform 437261847f8eSopenharmony_ci * @form 437361847f8eSopenharmony_ci * @since 10 437461847f8eSopenharmony_ci */ 437561847f8eSopenharmony_ci /** 437661847f8eSopenharmony_ci * Top of the stack pop-up state in the drawing state stack 437761847f8eSopenharmony_ci * 437861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 437961847f8eSopenharmony_ci * @crossplatform 438061847f8eSopenharmony_ci * @form 438161847f8eSopenharmony_ci * @atomicservice 438261847f8eSopenharmony_ci * @since 11 438361847f8eSopenharmony_ci */ 438461847f8eSopenharmony_ci restore(): void; 438561847f8eSopenharmony_ci 438661847f8eSopenharmony_ci /** 438761847f8eSopenharmony_ci * Saves the current drawing state to the drawing state stack 438861847f8eSopenharmony_ci * 438961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 439061847f8eSopenharmony_ci * @since 8 439161847f8eSopenharmony_ci */ 439261847f8eSopenharmony_ci /** 439361847f8eSopenharmony_ci * Saves the current drawing state to the drawing state stack 439461847f8eSopenharmony_ci * 439561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 439661847f8eSopenharmony_ci * @form 439761847f8eSopenharmony_ci * @since 9 439861847f8eSopenharmony_ci */ 439961847f8eSopenharmony_ci /** 440061847f8eSopenharmony_ci * Saves the current drawing state to the drawing state stack 440161847f8eSopenharmony_ci * 440261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 440361847f8eSopenharmony_ci * @crossplatform 440461847f8eSopenharmony_ci * @form 440561847f8eSopenharmony_ci * @since 10 440661847f8eSopenharmony_ci */ 440761847f8eSopenharmony_ci /** 440861847f8eSopenharmony_ci * Saves the current drawing state to the drawing state stack 440961847f8eSopenharmony_ci * 441061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 441161847f8eSopenharmony_ci * @crossplatform 441261847f8eSopenharmony_ci * @form 441361847f8eSopenharmony_ci * @atomicservice 441461847f8eSopenharmony_ci * @since 11 441561847f8eSopenharmony_ci */ 441661847f8eSopenharmony_ci save(): void; 441761847f8eSopenharmony_ci 441861847f8eSopenharmony_ci /** 441961847f8eSopenharmony_ci * Fills the specified text at the specified location 442061847f8eSopenharmony_ci * 442161847f8eSopenharmony_ci * @param { string } text - Text string to be drawn. 442261847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 442361847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the text. 442461847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the drawing. 442561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 442661847f8eSopenharmony_ci * @since 8 442761847f8eSopenharmony_ci */ 442861847f8eSopenharmony_ci /** 442961847f8eSopenharmony_ci * Fills the specified text at the specified location 443061847f8eSopenharmony_ci * 443161847f8eSopenharmony_ci * @param { string } text - Text string to be drawn. 443261847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 443361847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the text. 443461847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the drawing. 443561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 443661847f8eSopenharmony_ci * @form 443761847f8eSopenharmony_ci * @since 9 443861847f8eSopenharmony_ci */ 443961847f8eSopenharmony_ci /** 444061847f8eSopenharmony_ci * Fills the specified text at the specified location 444161847f8eSopenharmony_ci * 444261847f8eSopenharmony_ci * @param { string } text - Text string to be drawn. 444361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 444461847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the text. 444561847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the drawing. 444661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 444761847f8eSopenharmony_ci * @crossplatform 444861847f8eSopenharmony_ci * @form 444961847f8eSopenharmony_ci * @since 10 445061847f8eSopenharmony_ci */ 445161847f8eSopenharmony_ci /** 445261847f8eSopenharmony_ci * Fills the specified text at the specified location 445361847f8eSopenharmony_ci * 445461847f8eSopenharmony_ci * @param { string } text - Text string to be drawn. 445561847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 445661847f8eSopenharmony_ci * @param { number } y - The y-axis coordinate of the start point of the text. 445761847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the drawing. 445861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 445961847f8eSopenharmony_ci * @crossplatform 446061847f8eSopenharmony_ci * @form 446161847f8eSopenharmony_ci * @atomicservice 446261847f8eSopenharmony_ci * @since 11 446361847f8eSopenharmony_ci */ 446461847f8eSopenharmony_ci fillText(text: string, x: number, y: number, maxWidth?: number): void; 446561847f8eSopenharmony_ci 446661847f8eSopenharmony_ci /** 446761847f8eSopenharmony_ci * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}. 446861847f8eSopenharmony_ci * 446961847f8eSopenharmony_ci * @param { string } text - Text string to be measured. 447061847f8eSopenharmony_ci * @returns { TextMetrics } 447161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 447261847f8eSopenharmony_ci * @since 8 447361847f8eSopenharmony_ci */ 447461847f8eSopenharmony_ci /** 447561847f8eSopenharmony_ci * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}. 447661847f8eSopenharmony_ci * 447761847f8eSopenharmony_ci * @param { string } text - Text string to be measured. 447861847f8eSopenharmony_ci * @returns { TextMetrics } 447961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 448061847f8eSopenharmony_ci * @form 448161847f8eSopenharmony_ci * @since 9 448261847f8eSopenharmony_ci */ 448361847f8eSopenharmony_ci /** 448461847f8eSopenharmony_ci * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}. 448561847f8eSopenharmony_ci * 448661847f8eSopenharmony_ci * @param { string } text - Text string to be measured. 448761847f8eSopenharmony_ci * @returns { TextMetrics } 448861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 448961847f8eSopenharmony_ci * @crossplatform 449061847f8eSopenharmony_ci * @form 449161847f8eSopenharmony_ci * @since 10 449261847f8eSopenharmony_ci */ 449361847f8eSopenharmony_ci /** 449461847f8eSopenharmony_ci * Measure the size of a specified text. For details about the return value, see {@link TextMetrics}. 449561847f8eSopenharmony_ci * 449661847f8eSopenharmony_ci * @param { string } text - Text string to be measured. 449761847f8eSopenharmony_ci * @returns { TextMetrics } 449861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 449961847f8eSopenharmony_ci * @crossplatform 450061847f8eSopenharmony_ci * @form 450161847f8eSopenharmony_ci * @atomicservice 450261847f8eSopenharmony_ci * @since 11 450361847f8eSopenharmony_ci */ 450461847f8eSopenharmony_ci measureText(text: string): TextMetrics; 450561847f8eSopenharmony_ci 450661847f8eSopenharmony_ci /** 450761847f8eSopenharmony_ci * Stroke specified text at specified position 450861847f8eSopenharmony_ci * 450961847f8eSopenharmony_ci * @param { string } text - Text string to be stroked. 451061847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 451161847f8eSopenharmony_ci * @param { number } y - The y-axis-axis coordinate of the start point of the text. 451261847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the stroke. 451361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 451461847f8eSopenharmony_ci * @since 8 451561847f8eSopenharmony_ci */ 451661847f8eSopenharmony_ci /** 451761847f8eSopenharmony_ci * Stroke specified text at specified position 451861847f8eSopenharmony_ci * 451961847f8eSopenharmony_ci * @param { string } text - Text string to be stroked. 452061847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 452161847f8eSopenharmony_ci * @param { number } y - The y-axis-axis coordinate of the start point of the text. 452261847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the stroke. 452361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 452461847f8eSopenharmony_ci * @form 452561847f8eSopenharmony_ci * @since 9 452661847f8eSopenharmony_ci */ 452761847f8eSopenharmony_ci /** 452861847f8eSopenharmony_ci * Stroke specified text at specified position 452961847f8eSopenharmony_ci * 453061847f8eSopenharmony_ci * @param { string } text - Text string to be stroked. 453161847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 453261847f8eSopenharmony_ci * @param { number } y - The y-axis-axis coordinate of the start point of the text. 453361847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the stroke. 453461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 453561847f8eSopenharmony_ci * @crossplatform 453661847f8eSopenharmony_ci * @form 453761847f8eSopenharmony_ci * @since 10 453861847f8eSopenharmony_ci */ 453961847f8eSopenharmony_ci /** 454061847f8eSopenharmony_ci * Stroke specified text at specified position 454161847f8eSopenharmony_ci * 454261847f8eSopenharmony_ci * @param { string } text - Text string to be stroked. 454361847f8eSopenharmony_ci * @param { number } x - The x-axis coordinate of the start point of the text. 454461847f8eSopenharmony_ci * @param { number } y - The y-axis-axis coordinate of the start point of the text. 454561847f8eSopenharmony_ci * @param { number } maxWidth - Maximum width of the stroke. 454661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 454761847f8eSopenharmony_ci * @crossplatform 454861847f8eSopenharmony_ci * @form 454961847f8eSopenharmony_ci * @atomicservice 455061847f8eSopenharmony_ci * @since 11 455161847f8eSopenharmony_ci */ 455261847f8eSopenharmony_ci strokeText(text: string, x: number, y: number, maxWidth?: number): void; 455361847f8eSopenharmony_ci 455461847f8eSopenharmony_ci /** 455561847f8eSopenharmony_ci * Text drawing direction. For details, see {@link CanvasDirection}. 455661847f8eSopenharmony_ci * 455761847f8eSopenharmony_ci * @type { CanvasDirection } 455861847f8eSopenharmony_ci * @default inherit 455961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 456061847f8eSopenharmony_ci * @since 8 456161847f8eSopenharmony_ci */ 456261847f8eSopenharmony_ci /** 456361847f8eSopenharmony_ci * Text drawing direction. For details, see {@link CanvasDirection}. 456461847f8eSopenharmony_ci * 456561847f8eSopenharmony_ci * @type { CanvasDirection } 456661847f8eSopenharmony_ci * @default inherit 456761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 456861847f8eSopenharmony_ci * @form 456961847f8eSopenharmony_ci * @since 9 457061847f8eSopenharmony_ci */ 457161847f8eSopenharmony_ci /** 457261847f8eSopenharmony_ci * Text drawing direction. For details, see {@link CanvasDirection}. 457361847f8eSopenharmony_ci * 457461847f8eSopenharmony_ci * @type { CanvasDirection } 457561847f8eSopenharmony_ci * @default inherit 457661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 457761847f8eSopenharmony_ci * @crossplatform 457861847f8eSopenharmony_ci * @form 457961847f8eSopenharmony_ci * @since 10 458061847f8eSopenharmony_ci */ 458161847f8eSopenharmony_ci /** 458261847f8eSopenharmony_ci * Text drawing direction. For details, see {@link CanvasDirection}. 458361847f8eSopenharmony_ci * 458461847f8eSopenharmony_ci * @type { CanvasDirection } 458561847f8eSopenharmony_ci * @default inherit 458661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 458761847f8eSopenharmony_ci * @crossplatform 458861847f8eSopenharmony_ci * @form 458961847f8eSopenharmony_ci * @atomicservice 459061847f8eSopenharmony_ci * @since 11 459161847f8eSopenharmony_ci */ 459261847f8eSopenharmony_ci direction: CanvasDirection; 459361847f8eSopenharmony_ci 459461847f8eSopenharmony_ci /** 459561847f8eSopenharmony_ci * Font style. 459661847f8eSopenharmony_ci * 459761847f8eSopenharmony_ci * @type { string } 459861847f8eSopenharmony_ci * @default normal normal 14px sans-serif 459961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 460061847f8eSopenharmony_ci * @since 8 460161847f8eSopenharmony_ci */ 460261847f8eSopenharmony_ci /** 460361847f8eSopenharmony_ci * Font style. 460461847f8eSopenharmony_ci * 460561847f8eSopenharmony_ci * @type { string } 460661847f8eSopenharmony_ci * @default normal normal 14px sans-serif 460761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 460861847f8eSopenharmony_ci * @form 460961847f8eSopenharmony_ci * @since 9 461061847f8eSopenharmony_ci */ 461161847f8eSopenharmony_ci /** 461261847f8eSopenharmony_ci * Font style. 461361847f8eSopenharmony_ci * 461461847f8eSopenharmony_ci * @type { string } 461561847f8eSopenharmony_ci * @default normal normal 14px sans-serif 461661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 461761847f8eSopenharmony_ci * @crossplatform 461861847f8eSopenharmony_ci * @form 461961847f8eSopenharmony_ci * @since 10 462061847f8eSopenharmony_ci */ 462161847f8eSopenharmony_ci /** 462261847f8eSopenharmony_ci * Font style. 462361847f8eSopenharmony_ci * 462461847f8eSopenharmony_ci * @type { string } 462561847f8eSopenharmony_ci * @default normal normal 14px sans-serif 462661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 462761847f8eSopenharmony_ci * @crossplatform 462861847f8eSopenharmony_ci * @form 462961847f8eSopenharmony_ci * @atomicservice 463061847f8eSopenharmony_ci * @since 11 463161847f8eSopenharmony_ci */ 463261847f8eSopenharmony_ci font: string; 463361847f8eSopenharmony_ci 463461847f8eSopenharmony_ci /** 463561847f8eSopenharmony_ci * Text alignment mode. For details, see {@link CanvasTextAlign}. 463661847f8eSopenharmony_ci * 463761847f8eSopenharmony_ci * @type { CanvasTextAlign } 463861847f8eSopenharmony_ci * @default start 463961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 464061847f8eSopenharmony_ci * @since 8 464161847f8eSopenharmony_ci */ 464261847f8eSopenharmony_ci /** 464361847f8eSopenharmony_ci * Text alignment mode. For details, see {@link CanvasTextAlign}. 464461847f8eSopenharmony_ci * 464561847f8eSopenharmony_ci * @type { CanvasTextAlign } 464661847f8eSopenharmony_ci * @default start 464761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 464861847f8eSopenharmony_ci * @form 464961847f8eSopenharmony_ci * @since 9 465061847f8eSopenharmony_ci */ 465161847f8eSopenharmony_ci /** 465261847f8eSopenharmony_ci * Text alignment mode. For details, see {@link CanvasTextAlign}. 465361847f8eSopenharmony_ci * 465461847f8eSopenharmony_ci * @type { CanvasTextAlign } 465561847f8eSopenharmony_ci * @default start 465661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 465761847f8eSopenharmony_ci * @crossplatform 465861847f8eSopenharmony_ci * @form 465961847f8eSopenharmony_ci * @since 10 466061847f8eSopenharmony_ci */ 466161847f8eSopenharmony_ci /** 466261847f8eSopenharmony_ci * Text alignment mode. For details, see {@link CanvasTextAlign}. 466361847f8eSopenharmony_ci * 466461847f8eSopenharmony_ci * @type { CanvasTextAlign } 466561847f8eSopenharmony_ci * @default start 466661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 466761847f8eSopenharmony_ci * @crossplatform 466861847f8eSopenharmony_ci * @form 466961847f8eSopenharmony_ci * @atomicservice 467061847f8eSopenharmony_ci * @since 11 467161847f8eSopenharmony_ci */ 467261847f8eSopenharmony_ci textAlign: CanvasTextAlign; 467361847f8eSopenharmony_ci 467461847f8eSopenharmony_ci /** 467561847f8eSopenharmony_ci * Text baseline. For details, see {@link CanvasTextBaseline}. 467661847f8eSopenharmony_ci * 467761847f8eSopenharmony_ci * @type { CanvasTextBaseline } 467861847f8eSopenharmony_ci * @default alphabetic 467961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 468061847f8eSopenharmony_ci * @since 8 468161847f8eSopenharmony_ci */ 468261847f8eSopenharmony_ci /** 468361847f8eSopenharmony_ci * Text baseline. For details, see {@link CanvasTextBaseline}. 468461847f8eSopenharmony_ci * 468561847f8eSopenharmony_ci * @type { CanvasTextBaseline } 468661847f8eSopenharmony_ci * @default alphabetic 468761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 468861847f8eSopenharmony_ci * @form 468961847f8eSopenharmony_ci * @since 9 469061847f8eSopenharmony_ci */ 469161847f8eSopenharmony_ci /** 469261847f8eSopenharmony_ci * Text baseline. For details, see {@link CanvasTextBaseline}. 469361847f8eSopenharmony_ci * 469461847f8eSopenharmony_ci * @type { CanvasTextBaseline } 469561847f8eSopenharmony_ci * @default alphabetic 469661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 469761847f8eSopenharmony_ci * @crossplatform 469861847f8eSopenharmony_ci * @form 469961847f8eSopenharmony_ci * @since 10 470061847f8eSopenharmony_ci */ 470161847f8eSopenharmony_ci /** 470261847f8eSopenharmony_ci * Text baseline. For details, see {@link CanvasTextBaseline}. 470361847f8eSopenharmony_ci * 470461847f8eSopenharmony_ci * @type { CanvasTextBaseline } 470561847f8eSopenharmony_ci * @default alphabetic 470661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 470761847f8eSopenharmony_ci * @crossplatform 470861847f8eSopenharmony_ci * @form 470961847f8eSopenharmony_ci * @atomicservice 471061847f8eSopenharmony_ci * @since 11 471161847f8eSopenharmony_ci */ 471261847f8eSopenharmony_ci textBaseline: CanvasTextBaseline; 471361847f8eSopenharmony_ci 471461847f8eSopenharmony_ci /** 471561847f8eSopenharmony_ci * Obtains the currently applied transformation matrix. 471661847f8eSopenharmony_ci * 471761847f8eSopenharmony_ci * @returns { Matrix2D } 471861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 471961847f8eSopenharmony_ci * @since 8 472061847f8eSopenharmony_ci */ 472161847f8eSopenharmony_ci /** 472261847f8eSopenharmony_ci * Obtains the currently applied transformation matrix. 472361847f8eSopenharmony_ci * 472461847f8eSopenharmony_ci * @returns { Matrix2D } 472561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 472661847f8eSopenharmony_ci * @form 472761847f8eSopenharmony_ci * @since 9 472861847f8eSopenharmony_ci */ 472961847f8eSopenharmony_ci /** 473061847f8eSopenharmony_ci * Obtains the currently applied transformation matrix. 473161847f8eSopenharmony_ci * 473261847f8eSopenharmony_ci * @returns { Matrix2D } 473361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 473461847f8eSopenharmony_ci * @crossplatform 473561847f8eSopenharmony_ci * @form 473661847f8eSopenharmony_ci * @since 10 473761847f8eSopenharmony_ci */ 473861847f8eSopenharmony_ci /** 473961847f8eSopenharmony_ci * Obtains the currently applied transformation matrix. 474061847f8eSopenharmony_ci * 474161847f8eSopenharmony_ci * @returns { Matrix2D } 474261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 474361847f8eSopenharmony_ci * @crossplatform 474461847f8eSopenharmony_ci * @form 474561847f8eSopenharmony_ci * @atomicservice 474661847f8eSopenharmony_ci * @since 11 474761847f8eSopenharmony_ci */ 474861847f8eSopenharmony_ci getTransform(): Matrix2D; 474961847f8eSopenharmony_ci 475061847f8eSopenharmony_ci /** 475161847f8eSopenharmony_ci * Resets the current transformation matrix using the identity matrix 475261847f8eSopenharmony_ci * 475361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 475461847f8eSopenharmony_ci * @since 8 475561847f8eSopenharmony_ci */ 475661847f8eSopenharmony_ci /** 475761847f8eSopenharmony_ci * Resets the current transformation matrix using the identity matrix 475861847f8eSopenharmony_ci * 475961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 476061847f8eSopenharmony_ci * @form 476161847f8eSopenharmony_ci * @since 9 476261847f8eSopenharmony_ci */ 476361847f8eSopenharmony_ci /** 476461847f8eSopenharmony_ci * Resets the current transformation matrix using the identity matrix 476561847f8eSopenharmony_ci * 476661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 476761847f8eSopenharmony_ci * @crossplatform 476861847f8eSopenharmony_ci * @form 476961847f8eSopenharmony_ci * @since 10 477061847f8eSopenharmony_ci */ 477161847f8eSopenharmony_ci /** 477261847f8eSopenharmony_ci * Resets the current transformation matrix using the identity matrix 477361847f8eSopenharmony_ci * 477461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 477561847f8eSopenharmony_ci * @crossplatform 477661847f8eSopenharmony_ci * @form 477761847f8eSopenharmony_ci * @atomicservice 477861847f8eSopenharmony_ci * @since 11 477961847f8eSopenharmony_ci */ 478061847f8eSopenharmony_ci resetTransform(): void; 478161847f8eSopenharmony_ci 478261847f8eSopenharmony_ci /** 478361847f8eSopenharmony_ci * Adds the effect of a rotation 478461847f8eSopenharmony_ci * 478561847f8eSopenharmony_ci * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula: 478661847f8eSopenharmony_ci * degree * Math.PI / 180 478761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 478861847f8eSopenharmony_ci * @since 8 478961847f8eSopenharmony_ci */ 479061847f8eSopenharmony_ci /** 479161847f8eSopenharmony_ci * Adds the effect of a rotation 479261847f8eSopenharmony_ci * 479361847f8eSopenharmony_ci * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula: 479461847f8eSopenharmony_ci * degree * Math.PI / 180 479561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 479661847f8eSopenharmony_ci * @form 479761847f8eSopenharmony_ci * @since 9 479861847f8eSopenharmony_ci */ 479961847f8eSopenharmony_ci /** 480061847f8eSopenharmony_ci * Adds the effect of a rotation 480161847f8eSopenharmony_ci * 480261847f8eSopenharmony_ci * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula: 480361847f8eSopenharmony_ci * degree * Math.PI / 180 480461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 480561847f8eSopenharmony_ci * @crossplatform 480661847f8eSopenharmony_ci * @form 480761847f8eSopenharmony_ci * @since 10 480861847f8eSopenharmony_ci */ 480961847f8eSopenharmony_ci /** 481061847f8eSopenharmony_ci * Adds the effect of a rotation 481161847f8eSopenharmony_ci * 481261847f8eSopenharmony_ci * @param { number } angle - The radian of clockwise rotation, which can be converted to an angle value using the formula: 481361847f8eSopenharmony_ci * degree * Math.PI / 180 481461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 481561847f8eSopenharmony_ci * @crossplatform 481661847f8eSopenharmony_ci * @form 481761847f8eSopenharmony_ci * @atomicservice 481861847f8eSopenharmony_ci * @since 11 481961847f8eSopenharmony_ci */ 482061847f8eSopenharmony_ci rotate(angle: number): void; 482161847f8eSopenharmony_ci 482261847f8eSopenharmony_ci /** 482361847f8eSopenharmony_ci * Increases the scaling effect of the X and Y axes. 482461847f8eSopenharmony_ci * 482561847f8eSopenharmony_ci * @param { number } x - Horizontal scaling factor 482661847f8eSopenharmony_ci * @param { number } y - Vertical scaling factor 482761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 482861847f8eSopenharmony_ci * @since 8 482961847f8eSopenharmony_ci */ 483061847f8eSopenharmony_ci /** 483161847f8eSopenharmony_ci * Increases the scaling effect of the X and Y axes. 483261847f8eSopenharmony_ci * 483361847f8eSopenharmony_ci * @param { number } x - Horizontal scaling factor 483461847f8eSopenharmony_ci * @param { number } y - Vertical scaling factor 483561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 483661847f8eSopenharmony_ci * @form 483761847f8eSopenharmony_ci * @since 9 483861847f8eSopenharmony_ci */ 483961847f8eSopenharmony_ci /** 484061847f8eSopenharmony_ci * Increases the scaling effect of the X and Y axes. 484161847f8eSopenharmony_ci * 484261847f8eSopenharmony_ci * @param { number } x - Horizontal scaling factor 484361847f8eSopenharmony_ci * @param { number } y - Vertical scaling factor 484461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 484561847f8eSopenharmony_ci * @crossplatform 484661847f8eSopenharmony_ci * @form 484761847f8eSopenharmony_ci * @since 10 484861847f8eSopenharmony_ci */ 484961847f8eSopenharmony_ci /** 485061847f8eSopenharmony_ci * Increases the scaling effect of the X and Y axes. 485161847f8eSopenharmony_ci * 485261847f8eSopenharmony_ci * @param { number } x - Horizontal scaling factor 485361847f8eSopenharmony_ci * @param { number } y - Vertical scaling factor 485461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 485561847f8eSopenharmony_ci * @crossplatform 485661847f8eSopenharmony_ci * @form 485761847f8eSopenharmony_ci * @atomicservice 485861847f8eSopenharmony_ci * @since 11 485961847f8eSopenharmony_ci */ 486061847f8eSopenharmony_ci scale(x: number, y: number): void; 486161847f8eSopenharmony_ci 486261847f8eSopenharmony_ci /** 486361847f8eSopenharmony_ci * Adds 2D transformation effects, including rotation, translation, and scaling. 486461847f8eSopenharmony_ci * The current transformation matrix will not be overwritten. Multiple transformations will be superimposed. 486561847f8eSopenharmony_ci * 486661847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 486761847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 486861847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 486961847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 487061847f8eSopenharmony_ci * @param { number } e - Horizontal movement 487161847f8eSopenharmony_ci * @param { number } f - Vertical movement 487261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 487361847f8eSopenharmony_ci * @since 8 487461847f8eSopenharmony_ci */ 487561847f8eSopenharmony_ci /** 487661847f8eSopenharmony_ci * Adds 2D transformation effects, including rotation, translation, and scaling. 487761847f8eSopenharmony_ci * The current transformation matrix will not be overwritten. Multiple transformations will be superimposed. 487861847f8eSopenharmony_ci * 487961847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 488061847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 488161847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 488261847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 488361847f8eSopenharmony_ci * @param { number } e - Horizontal movement 488461847f8eSopenharmony_ci * @param { number } f - Vertical movement 488561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 488661847f8eSopenharmony_ci * @form 488761847f8eSopenharmony_ci * @since 9 488861847f8eSopenharmony_ci */ 488961847f8eSopenharmony_ci /** 489061847f8eSopenharmony_ci * Adds 2D transformation effects, including rotation, translation, and scaling. 489161847f8eSopenharmony_ci * The current transformation matrix will not be overwritten. Multiple transformations will be superimposed. 489261847f8eSopenharmony_ci * 489361847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 489461847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 489561847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 489661847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 489761847f8eSopenharmony_ci * @param { number } e - Horizontal movement 489861847f8eSopenharmony_ci * @param { number } f - Vertical movement 489961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 490061847f8eSopenharmony_ci * @crossplatform 490161847f8eSopenharmony_ci * @form 490261847f8eSopenharmony_ci * @since 10 490361847f8eSopenharmony_ci */ 490461847f8eSopenharmony_ci /** 490561847f8eSopenharmony_ci * Adds 2D transformation effects, including rotation, translation, and scaling. 490661847f8eSopenharmony_ci * The current transformation matrix will not be overwritten. Multiple transformations will be superimposed. 490761847f8eSopenharmony_ci * 490861847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 490961847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 491061847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 491161847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 491261847f8eSopenharmony_ci * @param { number } e - Horizontal movement 491361847f8eSopenharmony_ci * @param { number } f - Vertical movement 491461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 491561847f8eSopenharmony_ci * @crossplatform 491661847f8eSopenharmony_ci * @form 491761847f8eSopenharmony_ci * @atomicservice 491861847f8eSopenharmony_ci * @since 11 491961847f8eSopenharmony_ci */ 492061847f8eSopenharmony_ci setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; 492161847f8eSopenharmony_ci 492261847f8eSopenharmony_ci /** 492361847f8eSopenharmony_ci * The 2D transformation effect is added. The current transformation matrix is not overwritten and 492461847f8eSopenharmony_ci * the transformations are superimposed for multiple times. 492561847f8eSopenharmony_ci * 492661847f8eSopenharmony_ci * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}. 492761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 492861847f8eSopenharmony_ci * @since 8 492961847f8eSopenharmony_ci */ 493061847f8eSopenharmony_ci /** 493161847f8eSopenharmony_ci * The 2D transformation effect is added. The current transformation matrix is not overwritten and 493261847f8eSopenharmony_ci * the transformations are superimposed for multiple times. 493361847f8eSopenharmony_ci * 493461847f8eSopenharmony_ci * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}. 493561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 493661847f8eSopenharmony_ci * @form 493761847f8eSopenharmony_ci * @since 9 493861847f8eSopenharmony_ci */ 493961847f8eSopenharmony_ci /** 494061847f8eSopenharmony_ci * The 2D transformation effect is added. The current transformation matrix is not overwritten and 494161847f8eSopenharmony_ci * the transformations are superimposed for multiple times. 494261847f8eSopenharmony_ci * 494361847f8eSopenharmony_ci * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}. 494461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 494561847f8eSopenharmony_ci * @crossplatform 494661847f8eSopenharmony_ci * @form 494761847f8eSopenharmony_ci * @since 10 494861847f8eSopenharmony_ci */ 494961847f8eSopenharmony_ci /** 495061847f8eSopenharmony_ci * The 2D transformation effect is added. The current transformation matrix is not overwritten and 495161847f8eSopenharmony_ci * the transformations are superimposed for multiple times. 495261847f8eSopenharmony_ci * 495361847f8eSopenharmony_ci * @param { Matrix2D } transform - 2D transformation matrix. For details, see {@link Matrix2D}. 495461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 495561847f8eSopenharmony_ci * @crossplatform 495661847f8eSopenharmony_ci * @form 495761847f8eSopenharmony_ci * @atomicservice 495861847f8eSopenharmony_ci * @since 11 495961847f8eSopenharmony_ci */ 496061847f8eSopenharmony_ci setTransform(transform?: Matrix2D): void; 496161847f8eSopenharmony_ci 496261847f8eSopenharmony_ci /** 496361847f8eSopenharmony_ci * Adds the 2D transformation effect, including rotation, translation, and scaling, 496461847f8eSopenharmony_ci * and overwrites the current transformation matrix. 496561847f8eSopenharmony_ci * 496661847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 496761847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 496861847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 496961847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 497061847f8eSopenharmony_ci * @param { number } e - Horizontal movement 497161847f8eSopenharmony_ci * @param { number } f - Vertical movement 497261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 497361847f8eSopenharmony_ci * @since 8 497461847f8eSopenharmony_ci */ 497561847f8eSopenharmony_ci /** 497661847f8eSopenharmony_ci * Adds the 2D transformation effect, including rotation, translation, and scaling, 497761847f8eSopenharmony_ci * and overwrites the current transformation matrix. 497861847f8eSopenharmony_ci * 497961847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 498061847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 498161847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 498261847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 498361847f8eSopenharmony_ci * @param { number } e - Horizontal movement 498461847f8eSopenharmony_ci * @param { number } f - Vertical movement 498561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 498661847f8eSopenharmony_ci * @form 498761847f8eSopenharmony_ci * @since 9 498861847f8eSopenharmony_ci */ 498961847f8eSopenharmony_ci /** 499061847f8eSopenharmony_ci * Adds the 2D transformation effect, including rotation, translation, and scaling, 499161847f8eSopenharmony_ci * and overwrites the current transformation matrix. 499261847f8eSopenharmony_ci * 499361847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 499461847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 499561847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 499661847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 499761847f8eSopenharmony_ci * @param { number } e - Horizontal movement 499861847f8eSopenharmony_ci * @param { number } f - Vertical movement 499961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 500061847f8eSopenharmony_ci * @crossplatform 500161847f8eSopenharmony_ci * @form 500261847f8eSopenharmony_ci * @since 10 500361847f8eSopenharmony_ci */ 500461847f8eSopenharmony_ci /** 500561847f8eSopenharmony_ci * Adds the 2D transformation effect, including rotation, translation, and scaling, 500661847f8eSopenharmony_ci * and overwrites the current transformation matrix. 500761847f8eSopenharmony_ci * 500861847f8eSopenharmony_ci * @param { number } a - Horizontal Zoom 500961847f8eSopenharmony_ci * @param { number } b - Vertical Tilt 501061847f8eSopenharmony_ci * @param { number } c - Horizontal Tilt 501161847f8eSopenharmony_ci * @param { number } d - Vertical Zoom 501261847f8eSopenharmony_ci * @param { number } e - Horizontal movement 501361847f8eSopenharmony_ci * @param { number } f - Vertical movement 501461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 501561847f8eSopenharmony_ci * @crossplatform 501661847f8eSopenharmony_ci * @form 501761847f8eSopenharmony_ci * @atomicservice 501861847f8eSopenharmony_ci * @since 11 501961847f8eSopenharmony_ci */ 502061847f8eSopenharmony_ci transform(a: number, b: number, c: number, d: number, e: number, f: number): void; 502161847f8eSopenharmony_ci 502261847f8eSopenharmony_ci /** 502361847f8eSopenharmony_ci * Increases the translation effect of the X and Y axes 502461847f8eSopenharmony_ci * 502561847f8eSopenharmony_ci * @param { number } x - Horizontal movement distance 502661847f8eSopenharmony_ci * @param { number } y - Vertical travel distance 502761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 502861847f8eSopenharmony_ci * @since 8 502961847f8eSopenharmony_ci */ 503061847f8eSopenharmony_ci /** 503161847f8eSopenharmony_ci * Increases the translation effect of the X and Y axes 503261847f8eSopenharmony_ci * 503361847f8eSopenharmony_ci * @param { number } x - Horizontal movement distance 503461847f8eSopenharmony_ci * @param { number } y - Vertical travel distance 503561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 503661847f8eSopenharmony_ci * @form 503761847f8eSopenharmony_ci * @since 9 503861847f8eSopenharmony_ci */ 503961847f8eSopenharmony_ci /** 504061847f8eSopenharmony_ci * Increases the translation effect of the X and Y axes 504161847f8eSopenharmony_ci * 504261847f8eSopenharmony_ci * @param { number } x - Horizontal movement distance 504361847f8eSopenharmony_ci * @param { number } y - Vertical travel distance 504461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 504561847f8eSopenharmony_ci * @crossplatform 504661847f8eSopenharmony_ci * @form 504761847f8eSopenharmony_ci * @since 10 504861847f8eSopenharmony_ci */ 504961847f8eSopenharmony_ci /** 505061847f8eSopenharmony_ci * Increases the translation effect of the X and Y axes 505161847f8eSopenharmony_ci * 505261847f8eSopenharmony_ci * @param { number } x - Horizontal movement distance 505361847f8eSopenharmony_ci * @param { number } y - Vertical travel distance 505461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 505561847f8eSopenharmony_ci * @crossplatform 505661847f8eSopenharmony_ci * @form 505761847f8eSopenharmony_ci * @atomicservice 505861847f8eSopenharmony_ci * @since 11 505961847f8eSopenharmony_ci */ 506061847f8eSopenharmony_ci translate(x: number, y: number): void; 506161847f8eSopenharmony_ci 506261847f8eSopenharmony_ci /** 506361847f8eSopenharmony_ci * Set a PixelMap to the current context. The drawing content is synchronized to the PixelMap. 506461847f8eSopenharmony_ci * 506561847f8eSopenharmony_ci * @param { PixelMap } value - PixelMap object 506661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 506761847f8eSopenharmony_ci * @since 8 506861847f8eSopenharmony_ci */ 506961847f8eSopenharmony_ci /** 507061847f8eSopenharmony_ci * Set a PixelMap to the current context. The drawing content is synchronized to the PixelMap. 507161847f8eSopenharmony_ci * 507261847f8eSopenharmony_ci * @param { PixelMap } value - PixelMap object 507361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 507461847f8eSopenharmony_ci * @crossplatform 507561847f8eSopenharmony_ci * @since 10 507661847f8eSopenharmony_ci */ 507761847f8eSopenharmony_ci /** 507861847f8eSopenharmony_ci * Set a PixelMap to the current context. The drawing content is synchronized to the PixelMap. 507961847f8eSopenharmony_ci * 508061847f8eSopenharmony_ci * @param { PixelMap } value - PixelMap object 508161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 508261847f8eSopenharmony_ci * @crossplatform 508361847f8eSopenharmony_ci * @atomicservice 508461847f8eSopenharmony_ci * @since 11 508561847f8eSopenharmony_ci */ 508661847f8eSopenharmony_ci setPixelMap(value?: PixelMap): void; 508761847f8eSopenharmony_ci 508861847f8eSopenharmony_ci /** 508961847f8eSopenharmony_ci * transfer ImageBitmap to content. 509061847f8eSopenharmony_ci * 509161847f8eSopenharmony_ci * @param { ImageBitmap } bitmap 509261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 509361847f8eSopenharmony_ci * @since 8 509461847f8eSopenharmony_ci */ 509561847f8eSopenharmony_ci /** 509661847f8eSopenharmony_ci * transfer ImageBitmap to content. 509761847f8eSopenharmony_ci * 509861847f8eSopenharmony_ci * @param { ImageBitmap } bitmap 509961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 510061847f8eSopenharmony_ci * @form 510161847f8eSopenharmony_ci * @since 9 510261847f8eSopenharmony_ci */ 510361847f8eSopenharmony_ci /** 510461847f8eSopenharmony_ci * transfer ImageBitmap to content. 510561847f8eSopenharmony_ci * 510661847f8eSopenharmony_ci * @param { ImageBitmap } bitmap 510761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 510861847f8eSopenharmony_ci * @crossplatform 510961847f8eSopenharmony_ci * @form 511061847f8eSopenharmony_ci * @since 10 511161847f8eSopenharmony_ci */ 511261847f8eSopenharmony_ci /** 511361847f8eSopenharmony_ci * transfer ImageBitmap to content. 511461847f8eSopenharmony_ci * 511561847f8eSopenharmony_ci * @param { ImageBitmap } bitmap 511661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 511761847f8eSopenharmony_ci * @crossplatform 511861847f8eSopenharmony_ci * @form 511961847f8eSopenharmony_ci * @atomicservice 512061847f8eSopenharmony_ci * @since 11 512161847f8eSopenharmony_ci */ 512261847f8eSopenharmony_ci transferFromImageBitmap(bitmap: ImageBitmap): void; 512361847f8eSopenharmony_ci 512461847f8eSopenharmony_ci /** 512561847f8eSopenharmony_ci * Allocate a layer for subsequent drawing. 512661847f8eSopenharmony_ci * 512761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 512861847f8eSopenharmony_ci * @crossplatform 512961847f8eSopenharmony_ci * @atomicservice 513061847f8eSopenharmony_ci * @since 12 513161847f8eSopenharmony_ci */ 513261847f8eSopenharmony_ci saveLayer(): void; 513361847f8eSopenharmony_ci 513461847f8eSopenharmony_ci /** 513561847f8eSopenharmony_ci * Remove changes to transform and clip since saveLayer was last called and draw the layer on canvas. 513661847f8eSopenharmony_ci * 513761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 513861847f8eSopenharmony_ci * @crossplatform 513961847f8eSopenharmony_ci * @atomicservice 514061847f8eSopenharmony_ci * @since 12 514161847f8eSopenharmony_ci */ 514261847f8eSopenharmony_ci restoreLayer(): void; 514361847f8eSopenharmony_ci 514461847f8eSopenharmony_ci /** 514561847f8eSopenharmony_ci * Clear the backing buffer, drawing state stack, any defined paths, and styles. 514661847f8eSopenharmony_ci * 514761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 514861847f8eSopenharmony_ci * @crossplatform 514961847f8eSopenharmony_ci * @atomicservice 515061847f8eSopenharmony_ci * @since 12 515161847f8eSopenharmony_ci */ 515261847f8eSopenharmony_ci reset(): void; 515361847f8eSopenharmony_ci} 515461847f8eSopenharmony_ci 515561847f8eSopenharmony_ci/** 515661847f8eSopenharmony_ci * Draw context object for the Canvas component. 515761847f8eSopenharmony_ci * 515861847f8eSopenharmony_ci * @extends CanvasRenderer 515961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 516061847f8eSopenharmony_ci * @since 8 516161847f8eSopenharmony_ci */ 516261847f8eSopenharmony_ci/** 516361847f8eSopenharmony_ci * Draw context object for the Canvas component. 516461847f8eSopenharmony_ci * 516561847f8eSopenharmony_ci * @extends CanvasRenderer 516661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 516761847f8eSopenharmony_ci * @form 516861847f8eSopenharmony_ci * @since 9 516961847f8eSopenharmony_ci */ 517061847f8eSopenharmony_ci/** 517161847f8eSopenharmony_ci * Draw context object for the Canvas component. 517261847f8eSopenharmony_ci * 517361847f8eSopenharmony_ci * @extends CanvasRenderer 517461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 517561847f8eSopenharmony_ci * @crossplatform 517661847f8eSopenharmony_ci * @form 517761847f8eSopenharmony_ci * @since 10 517861847f8eSopenharmony_ci */ 517961847f8eSopenharmony_ci/** 518061847f8eSopenharmony_ci * Draw context object for the Canvas component. 518161847f8eSopenharmony_ci * 518261847f8eSopenharmony_ci * @extends CanvasRenderer 518361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 518461847f8eSopenharmony_ci * @crossplatform 518561847f8eSopenharmony_ci * @form 518661847f8eSopenharmony_ci * @atomicservice 518761847f8eSopenharmony_ci * @since 11 518861847f8eSopenharmony_ci */ 518961847f8eSopenharmony_cideclare class CanvasRenderingContext2D extends CanvasRenderer { 519061847f8eSopenharmony_ci /** 519161847f8eSopenharmony_ci * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. 519261847f8eSopenharmony_ci * 519361847f8eSopenharmony_ci * @type { number } 519461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 519561847f8eSopenharmony_ci * @since 8 519661847f8eSopenharmony_ci */ 519761847f8eSopenharmony_ci /** 519861847f8eSopenharmony_ci * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. 519961847f8eSopenharmony_ci * 520061847f8eSopenharmony_ci * @type { number } 520161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 520261847f8eSopenharmony_ci * @form 520361847f8eSopenharmony_ci * @since 9 520461847f8eSopenharmony_ci */ 520561847f8eSopenharmony_ci /** 520661847f8eSopenharmony_ci * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. 520761847f8eSopenharmony_ci * 520861847f8eSopenharmony_ci * @type { number } 520961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 521061847f8eSopenharmony_ci * @crossplatform 521161847f8eSopenharmony_ci * @form 521261847f8eSopenharmony_ci * @since 10 521361847f8eSopenharmony_ci */ 521461847f8eSopenharmony_ci /** 521561847f8eSopenharmony_ci * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. 521661847f8eSopenharmony_ci * 521761847f8eSopenharmony_ci * @type { number } 521861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 521961847f8eSopenharmony_ci * @crossplatform 522061847f8eSopenharmony_ci * @form 522161847f8eSopenharmony_ci * @atomicservice 522261847f8eSopenharmony_ci * @since 11 522361847f8eSopenharmony_ci */ 522461847f8eSopenharmony_ci readonly height: number; 522561847f8eSopenharmony_ci 522661847f8eSopenharmony_ci /** 522761847f8eSopenharmony_ci * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. 522861847f8eSopenharmony_ci * 522961847f8eSopenharmony_ci * @type { number } 523061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 523161847f8eSopenharmony_ci * @since 8 523261847f8eSopenharmony_ci */ 523361847f8eSopenharmony_ci /** 523461847f8eSopenharmony_ci * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. 523561847f8eSopenharmony_ci * 523661847f8eSopenharmony_ci * @type { number } 523761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 523861847f8eSopenharmony_ci * @form 523961847f8eSopenharmony_ci * @since 9 524061847f8eSopenharmony_ci */ 524161847f8eSopenharmony_ci /** 524261847f8eSopenharmony_ci * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. 524361847f8eSopenharmony_ci * 524461847f8eSopenharmony_ci * @type { number } 524561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 524661847f8eSopenharmony_ci * @crossplatform 524761847f8eSopenharmony_ci * @form 524861847f8eSopenharmony_ci * @since 10 524961847f8eSopenharmony_ci */ 525061847f8eSopenharmony_ci /** 525161847f8eSopenharmony_ci * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. 525261847f8eSopenharmony_ci * 525361847f8eSopenharmony_ci * @type { number } 525461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 525561847f8eSopenharmony_ci * @crossplatform 525661847f8eSopenharmony_ci * @form 525761847f8eSopenharmony_ci * @atomicservice 525861847f8eSopenharmony_ci * @since 11 525961847f8eSopenharmony_ci */ 526061847f8eSopenharmony_ci readonly width: number; 526161847f8eSopenharmony_ci 526261847f8eSopenharmony_ci /** 526361847f8eSopenharmony_ci * Frame node of the canvas. The default value is null. 526461847f8eSopenharmony_ci * 526561847f8eSopenharmony_ci * @type { FrameNode } 526661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 526761847f8eSopenharmony_ci * @crossplatform 526861847f8eSopenharmony_ci * @atomicservice 526961847f8eSopenharmony_ci * @since 13 527061847f8eSopenharmony_ci */ 527161847f8eSopenharmony_ci readonly canvas: FrameNode; 527261847f8eSopenharmony_ci 527361847f8eSopenharmony_ci /** 527461847f8eSopenharmony_ci * Generate a character string in the data url format. 527561847f8eSopenharmony_ci * 527661847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 527761847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 527861847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 527961847f8eSopenharmony_ci * @returns { string } 528061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 528161847f8eSopenharmony_ci * @since 8 528261847f8eSopenharmony_ci */ 528361847f8eSopenharmony_ci /** 528461847f8eSopenharmony_ci * Generate a character string in the data url format. 528561847f8eSopenharmony_ci * 528661847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 528761847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 528861847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 528961847f8eSopenharmony_ci * @returns { string } 529061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 529161847f8eSopenharmony_ci * @form 529261847f8eSopenharmony_ci * @since 9 529361847f8eSopenharmony_ci */ 529461847f8eSopenharmony_ci /** 529561847f8eSopenharmony_ci * Generate a character string in the data url format. 529661847f8eSopenharmony_ci * 529761847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 529861847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 529961847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 530061847f8eSopenharmony_ci * @returns { string } 530161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 530261847f8eSopenharmony_ci * @crossplatform 530361847f8eSopenharmony_ci * @form 530461847f8eSopenharmony_ci * @since 10 530561847f8eSopenharmony_ci */ 530661847f8eSopenharmony_ci /** 530761847f8eSopenharmony_ci * Generate a character string in the data url format. 530861847f8eSopenharmony_ci * 530961847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 531061847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 531161847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 531261847f8eSopenharmony_ci * @returns { string } 531361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 531461847f8eSopenharmony_ci * @crossplatform 531561847f8eSopenharmony_ci * @form 531661847f8eSopenharmony_ci * @atomicservice 531761847f8eSopenharmony_ci * @since 11 531861847f8eSopenharmony_ci */ 531961847f8eSopenharmony_ci toDataURL(type?: string, quality?: any): string; 532061847f8eSopenharmony_ci 532161847f8eSopenharmony_ci /** 532261847f8eSopenharmony_ci * Start image analyzer. 532361847f8eSopenharmony_ci * 532461847f8eSopenharmony_ci * @param { ImageAnalyzerConfig } config - Image analyzer config. 532561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 532661847f8eSopenharmony_ci * @throws { BusinessError } 110001 - Image analysis feature is not supported. 532761847f8eSopenharmony_ci * @throws { BusinessError } 110002 - Image analysis is currently being executed. 532861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 532961847f8eSopenharmony_ci * @atomicservice 533061847f8eSopenharmony_ci * @since 12 533161847f8eSopenharmony_ci */ 533261847f8eSopenharmony_ci startImageAnalyzer(config: ImageAnalyzerConfig): Promise<void>; 533361847f8eSopenharmony_ci 533461847f8eSopenharmony_ci /** 533561847f8eSopenharmony_ci * Stop image analyzer. 533661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 533761847f8eSopenharmony_ci * @atomicservice 533861847f8eSopenharmony_ci * @since 12 533961847f8eSopenharmony_ci */ 534061847f8eSopenharmony_ci stopImageAnalyzer(): void; 534161847f8eSopenharmony_ci 534261847f8eSopenharmony_ci /** 534361847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 534461847f8eSopenharmony_ci * 534561847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 534661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 534761847f8eSopenharmony_ci * @since 8 534861847f8eSopenharmony_ci */ 534961847f8eSopenharmony_ci /** 535061847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 535161847f8eSopenharmony_ci * 535261847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 535361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 535461847f8eSopenharmony_ci * @form 535561847f8eSopenharmony_ci * @since 9 535661847f8eSopenharmony_ci */ 535761847f8eSopenharmony_ci /** 535861847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 535961847f8eSopenharmony_ci * 536061847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 536161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 536261847f8eSopenharmony_ci * @crossplatform 536361847f8eSopenharmony_ci * @form 536461847f8eSopenharmony_ci * @since 10 536561847f8eSopenharmony_ci */ 536661847f8eSopenharmony_ci /** 536761847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 536861847f8eSopenharmony_ci * 536961847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 537061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 537161847f8eSopenharmony_ci * @crossplatform 537261847f8eSopenharmony_ci * @form 537361847f8eSopenharmony_ci * @atomicservice 537461847f8eSopenharmony_ci * @since 11 537561847f8eSopenharmony_ci */ 537661847f8eSopenharmony_ci constructor(settings?: RenderingContextSettings); 537761847f8eSopenharmony_ci 537861847f8eSopenharmony_ci /** 537961847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 538061847f8eSopenharmony_ci * 538161847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 538261847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 538361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 538461847f8eSopenharmony_ci * @crossplatform 538561847f8eSopenharmony_ci * @form 538661847f8eSopenharmony_ci * @atomicservice 538761847f8eSopenharmony_ci * @since 12 538861847f8eSopenharmony_ci */ 538961847f8eSopenharmony_ci constructor(settings?: RenderingContextSettings, unit?: LengthMetricsUnit); 539061847f8eSopenharmony_ci 539161847f8eSopenharmony_ci /** 539261847f8eSopenharmony_ci * Register the listener that watches if the canvasrenderingcontext2d attached to the Canvas frameNode. 539361847f8eSopenharmony_ci * 539461847f8eSopenharmony_ci * @param { 'onAttach' } type Indicates the type of event. 539561847f8eSopenharmony_ci * @param { Callback<void> } callback Indicates the listener. 539661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Input parameter error. Possible causes: 539761847f8eSopenharmony_ci * 1. Mandatory parameters are left unspecified; 539861847f8eSopenharmony_ci * 2. Incorrect parameter types; 539961847f8eSopenharmony_ci * 3. Parameter verification failed. 540061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 540161847f8eSopenharmony_ci * @crossplatform 540261847f8eSopenharmony_ci * @atomicservice 540361847f8eSopenharmony_ci * @since 13 540461847f8eSopenharmony_ci */ 540561847f8eSopenharmony_ci on(type: 'onAttach', callback: Callback<void>): void; 540661847f8eSopenharmony_ci 540761847f8eSopenharmony_ci /** 540861847f8eSopenharmony_ci * Unregister the listener that watches if the canvasrenderingcontext2d attached to the Canvas frameNode. 540961847f8eSopenharmony_ci * 541061847f8eSopenharmony_ci * @param { 'onAttach' } type Indicates the type of event. 541161847f8eSopenharmony_ci * @param { Callback<void> } callback Indicates the listener. 541261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Input parameter error. Possible causes: 541361847f8eSopenharmony_ci * 1. Mandatory parameters are left unspecified; 541461847f8eSopenharmony_ci * 2. Incorrect parameter types; 541561847f8eSopenharmony_ci * 3. Parameter verification failed. 541661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 541761847f8eSopenharmony_ci * @crossplatform 541861847f8eSopenharmony_ci * @atomicservice 541961847f8eSopenharmony_ci * @since 13 542061847f8eSopenharmony_ci */ 542161847f8eSopenharmony_ci off(type: 'onAttach', callback?: Callback<void>): void; 542261847f8eSopenharmony_ci 542361847f8eSopenharmony_ci /** 542461847f8eSopenharmony_ci * Register the listener that watches if the canvasrenderingcontext2d detached from the Canvas frameNode. 542561847f8eSopenharmony_ci * 542661847f8eSopenharmony_ci * @param { 'onDetach' } type Indicates the type of event. 542761847f8eSopenharmony_ci * @param { Callback<void> } callback Indicates the listener. 542861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Input parameter error. Possible causes: 542961847f8eSopenharmony_ci * 1. Mandatory parameters are left unspecified; 543061847f8eSopenharmony_ci * 2. Incorrect parameter types; 543161847f8eSopenharmony_ci * 3. Parameter verification failed. 543261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 543361847f8eSopenharmony_ci * @crossplatform 543461847f8eSopenharmony_ci * @atomicservice 543561847f8eSopenharmony_ci * @since 13 543661847f8eSopenharmony_ci */ 543761847f8eSopenharmony_ci on(type: 'onDetach', callback: Callback<void>): void; 543861847f8eSopenharmony_ci 543961847f8eSopenharmony_ci /** 544061847f8eSopenharmony_ci * Unregister the listener that watches if the canvasrenderingcontext2d detached from the Canvas frameNode. 544161847f8eSopenharmony_ci * 544261847f8eSopenharmony_ci * @param { 'onDetach' } type Indicates the type of event. 544361847f8eSopenharmony_ci * @param { Callback<void> } callback Indicates the listener. 544461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Input parameter error. Possible causes: 544561847f8eSopenharmony_ci * 1. Mandatory parameters are left unspecified; 544661847f8eSopenharmony_ci * 2. Incorrect parameter types; 544761847f8eSopenharmony_ci * 3. Parameter verification failed. 544861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 544961847f8eSopenharmony_ci * @crossplatform 545061847f8eSopenharmony_ci * @atomicservice 545161847f8eSopenharmony_ci * @since 13 545261847f8eSopenharmony_ci */ 545361847f8eSopenharmony_ci off(type: 'onDetach', callback?: Callback<void>): void; 545461847f8eSopenharmony_ci} 545561847f8eSopenharmony_ci 545661847f8eSopenharmony_ci/** 545761847f8eSopenharmony_ci * Draw context object for the OffscreenCanvas component. 545861847f8eSopenharmony_ci * 545961847f8eSopenharmony_ci * @extends CanvasRenderer 546061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 546161847f8eSopenharmony_ci * @since 8 546261847f8eSopenharmony_ci */ 546361847f8eSopenharmony_ci/** 546461847f8eSopenharmony_ci * Draw context object for the OffscreenCanvas component. 546561847f8eSopenharmony_ci * 546661847f8eSopenharmony_ci * @extends CanvasRenderer 546761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 546861847f8eSopenharmony_ci * @form 546961847f8eSopenharmony_ci * @since 9 547061847f8eSopenharmony_ci */ 547161847f8eSopenharmony_ci/** 547261847f8eSopenharmony_ci * Draw context object for the OffscreenCanvas component. 547361847f8eSopenharmony_ci * 547461847f8eSopenharmony_ci * @extends CanvasRenderer 547561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 547661847f8eSopenharmony_ci * @crossplatform 547761847f8eSopenharmony_ci * @form 547861847f8eSopenharmony_ci * @since 10 547961847f8eSopenharmony_ci */ 548061847f8eSopenharmony_ci/** 548161847f8eSopenharmony_ci * Draw context object for the OffscreenCanvas component. 548261847f8eSopenharmony_ci * 548361847f8eSopenharmony_ci * @extends CanvasRenderer 548461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 548561847f8eSopenharmony_ci * @crossplatform 548661847f8eSopenharmony_ci * @form 548761847f8eSopenharmony_ci * @atomicservice 548861847f8eSopenharmony_ci * @since 11 548961847f8eSopenharmony_ci */ 549061847f8eSopenharmony_cideclare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { 549161847f8eSopenharmony_ci /** 549261847f8eSopenharmony_ci * Generate a character string in the data url format. 549361847f8eSopenharmony_ci * 549461847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 549561847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 549661847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 549761847f8eSopenharmony_ci * @returns { string } 549861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 549961847f8eSopenharmony_ci * @since 8 550061847f8eSopenharmony_ci */ 550161847f8eSopenharmony_ci /** 550261847f8eSopenharmony_ci * Generate a character string in the data url format. 550361847f8eSopenharmony_ci * 550461847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 550561847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 550661847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 550761847f8eSopenharmony_ci * @returns { string } 550861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 550961847f8eSopenharmony_ci * @form 551061847f8eSopenharmony_ci * @since 9 551161847f8eSopenharmony_ci */ 551261847f8eSopenharmony_ci /** 551361847f8eSopenharmony_ci * Generate a character string in the data url format. 551461847f8eSopenharmony_ci * 551561847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 551661847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 551761847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 551861847f8eSopenharmony_ci * @returns { string } 551961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 552061847f8eSopenharmony_ci * @crossplatform 552161847f8eSopenharmony_ci * @form 552261847f8eSopenharmony_ci * @since 10 552361847f8eSopenharmony_ci */ 552461847f8eSopenharmony_ci /** 552561847f8eSopenharmony_ci * Generate a character string in the data url format. 552661847f8eSopenharmony_ci * 552761847f8eSopenharmony_ci * @param { string } type - Image format. The default value is image/png. 552861847f8eSopenharmony_ci * @param { any } quality - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. 552961847f8eSopenharmony_ci * If the value is out of the range, the default value 0.92 is used. 553061847f8eSopenharmony_ci * @returns { string } 553161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 553261847f8eSopenharmony_ci * @crossplatform 553361847f8eSopenharmony_ci * @form 553461847f8eSopenharmony_ci * @atomicservice 553561847f8eSopenharmony_ci * @since 11 553661847f8eSopenharmony_ci */ 553761847f8eSopenharmony_ci toDataURL(type?: string, quality?: any): string; 553861847f8eSopenharmony_ci 553961847f8eSopenharmony_ci /** 554061847f8eSopenharmony_ci * transfer the content to ImageBitmap 554161847f8eSopenharmony_ci * 554261847f8eSopenharmony_ci * @returns { ImageBitmap } 554361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 554461847f8eSopenharmony_ci * @since 8 554561847f8eSopenharmony_ci */ 554661847f8eSopenharmony_ci /** 554761847f8eSopenharmony_ci * transfer the content to ImageBitmap 554861847f8eSopenharmony_ci * 554961847f8eSopenharmony_ci * @returns { ImageBitmap } 555061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 555161847f8eSopenharmony_ci * @form 555261847f8eSopenharmony_ci * @since 9 555361847f8eSopenharmony_ci */ 555461847f8eSopenharmony_ci /** 555561847f8eSopenharmony_ci * transfer the content to ImageBitmap 555661847f8eSopenharmony_ci * 555761847f8eSopenharmony_ci * @returns { ImageBitmap } 555861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 555961847f8eSopenharmony_ci * @crossplatform 556061847f8eSopenharmony_ci * @form 556161847f8eSopenharmony_ci * @since 10 556261847f8eSopenharmony_ci */ 556361847f8eSopenharmony_ci /** 556461847f8eSopenharmony_ci * transfer the content to ImageBitmap 556561847f8eSopenharmony_ci * 556661847f8eSopenharmony_ci * @returns { ImageBitmap } 556761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 556861847f8eSopenharmony_ci * @crossplatform 556961847f8eSopenharmony_ci * @form 557061847f8eSopenharmony_ci * @atomicservice 557161847f8eSopenharmony_ci * @since 11 557261847f8eSopenharmony_ci */ 557361847f8eSopenharmony_ci transferToImageBitmap(): ImageBitmap; 557461847f8eSopenharmony_ci 557561847f8eSopenharmony_ci /** 557661847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 557761847f8eSopenharmony_ci * 557861847f8eSopenharmony_ci * @param { number } width - the width of the OffscreenCanvas 557961847f8eSopenharmony_ci * @param { number } height - the height of the OffscreenCanvas 558061847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 558161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 558261847f8eSopenharmony_ci * @since 8 558361847f8eSopenharmony_ci */ 558461847f8eSopenharmony_ci /** 558561847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 558661847f8eSopenharmony_ci * 558761847f8eSopenharmony_ci * @param { number } width - the width of the OffscreenCanvas 558861847f8eSopenharmony_ci * @param { number } height - the height of the OffscreenCanvas 558961847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 559061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 559161847f8eSopenharmony_ci * @form 559261847f8eSopenharmony_ci * @since 9 559361847f8eSopenharmony_ci */ 559461847f8eSopenharmony_ci /** 559561847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 559661847f8eSopenharmony_ci * 559761847f8eSopenharmony_ci * @param { number } width - the width of the OffscreenCanvas 559861847f8eSopenharmony_ci * @param { number } height - the height of the OffscreenCanvas 559961847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 560061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 560161847f8eSopenharmony_ci * @crossplatform 560261847f8eSopenharmony_ci * @form 560361847f8eSopenharmony_ci * @since 10 560461847f8eSopenharmony_ci */ 560561847f8eSopenharmony_ci /** 560661847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 560761847f8eSopenharmony_ci * 560861847f8eSopenharmony_ci * @param { number } width - the width of the OffscreenCanvas 560961847f8eSopenharmony_ci * @param { number } height - the height of the OffscreenCanvas 561061847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 561161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 561261847f8eSopenharmony_ci * @crossplatform 561361847f8eSopenharmony_ci * @form 561461847f8eSopenharmony_ci * @atomicservice 561561847f8eSopenharmony_ci * @since 11 561661847f8eSopenharmony_ci */ 561761847f8eSopenharmony_ci constructor(width: number, height: number, settings?: RenderingContextSettings); 561861847f8eSopenharmony_ci 561961847f8eSopenharmony_ci /** 562061847f8eSopenharmony_ci * Constructor of the canvas drawing context object, which is used to create a drawing context object. 562161847f8eSopenharmony_ci * 562261847f8eSopenharmony_ci * @param { number } width - the width of the OffscreenCanvas 562361847f8eSopenharmony_ci * @param { number } height - the height of the OffscreenCanvas 562461847f8eSopenharmony_ci * @param { RenderingContextSettings } settings - Drawing attribute. For details, see {@link RenderingContextSettings}. 562561847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 562661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 562761847f8eSopenharmony_ci * @crossplatform 562861847f8eSopenharmony_ci * @form 562961847f8eSopenharmony_ci * @atomicservice 563061847f8eSopenharmony_ci * @since 12 563161847f8eSopenharmony_ci */ 563261847f8eSopenharmony_ci constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); 563361847f8eSopenharmony_ci} 563461847f8eSopenharmony_ci 563561847f8eSopenharmony_ci/** 563661847f8eSopenharmony_ci * Draw an object off the screen. The drawing content is not directly displayed on the screen. 563761847f8eSopenharmony_ci * 563861847f8eSopenharmony_ci * @extends CanvasRenderer 563961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 564061847f8eSopenharmony_ci * @since 8 564161847f8eSopenharmony_ci */ 564261847f8eSopenharmony_ci/** 564361847f8eSopenharmony_ci * Draw an object off the screen. The drawing content is not directly displayed on the screen. 564461847f8eSopenharmony_ci * 564561847f8eSopenharmony_ci * @extends CanvasRenderer 564661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 564761847f8eSopenharmony_ci * @form 564861847f8eSopenharmony_ci * @since 9 564961847f8eSopenharmony_ci */ 565061847f8eSopenharmony_ci/** 565161847f8eSopenharmony_ci * Draw an object off the screen. The drawing content is not directly displayed on the screen. 565261847f8eSopenharmony_ci * 565361847f8eSopenharmony_ci * @extends CanvasRenderer 565461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 565561847f8eSopenharmony_ci * @crossplatform 565661847f8eSopenharmony_ci * @form 565761847f8eSopenharmony_ci * @since 10 565861847f8eSopenharmony_ci */ 565961847f8eSopenharmony_ci/** 566061847f8eSopenharmony_ci * Draw an object off the screen. The drawing content is not directly displayed on the screen. 566161847f8eSopenharmony_ci * 566261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 566361847f8eSopenharmony_ci * @crossplatform 566461847f8eSopenharmony_ci * @form 566561847f8eSopenharmony_ci * @atomicservice 566661847f8eSopenharmony_ci * @since 11 566761847f8eSopenharmony_ci */ 566861847f8eSopenharmony_cideclare class OffscreenCanvas { 566961847f8eSopenharmony_ci /** 567061847f8eSopenharmony_ci * Height of the off-screen canvas. 567161847f8eSopenharmony_ci * 567261847f8eSopenharmony_ci * @type { number } 567361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 567461847f8eSopenharmony_ci * @since 8 567561847f8eSopenharmony_ci */ 567661847f8eSopenharmony_ci /** 567761847f8eSopenharmony_ci * Height of the off-screen canvas. 567861847f8eSopenharmony_ci * 567961847f8eSopenharmony_ci * @type { number } 568061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 568161847f8eSopenharmony_ci * @form 568261847f8eSopenharmony_ci * @since 9 568361847f8eSopenharmony_ci */ 568461847f8eSopenharmony_ci /** 568561847f8eSopenharmony_ci * Height of the off-screen canvas. 568661847f8eSopenharmony_ci * 568761847f8eSopenharmony_ci * @type { number } 568861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 568961847f8eSopenharmony_ci * @crossplatform 569061847f8eSopenharmony_ci * @form 569161847f8eSopenharmony_ci * @since 10 569261847f8eSopenharmony_ci */ 569361847f8eSopenharmony_ci /** 569461847f8eSopenharmony_ci * Height of the off-screen canvas. 569561847f8eSopenharmony_ci * 569661847f8eSopenharmony_ci * @type { number } 569761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 569861847f8eSopenharmony_ci * @crossplatform 569961847f8eSopenharmony_ci * @form 570061847f8eSopenharmony_ci * @atomicservice 570161847f8eSopenharmony_ci * @since 11 570261847f8eSopenharmony_ci */ 570361847f8eSopenharmony_ci height: number; 570461847f8eSopenharmony_ci 570561847f8eSopenharmony_ci /** 570661847f8eSopenharmony_ci * Width of the off-screen canvas. 570761847f8eSopenharmony_ci * 570861847f8eSopenharmony_ci * @type { number } 570961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 571061847f8eSopenharmony_ci * @since 8 571161847f8eSopenharmony_ci */ 571261847f8eSopenharmony_ci /** 571361847f8eSopenharmony_ci * Width of the off-screen canvas. 571461847f8eSopenharmony_ci * 571561847f8eSopenharmony_ci * @type { number } 571661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 571761847f8eSopenharmony_ci * @form 571861847f8eSopenharmony_ci * @since 9 571961847f8eSopenharmony_ci */ 572061847f8eSopenharmony_ci /** 572161847f8eSopenharmony_ci * Width of the off-screen canvas. 572261847f8eSopenharmony_ci * 572361847f8eSopenharmony_ci * @type { number } 572461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 572561847f8eSopenharmony_ci * @crossplatform 572661847f8eSopenharmony_ci * @form 572761847f8eSopenharmony_ci * @since 10 572861847f8eSopenharmony_ci */ 572961847f8eSopenharmony_ci /** 573061847f8eSopenharmony_ci * Width of the off-screen canvas. 573161847f8eSopenharmony_ci * 573261847f8eSopenharmony_ci * @type { number } 573361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 573461847f8eSopenharmony_ci * @crossplatform 573561847f8eSopenharmony_ci * @form 573661847f8eSopenharmony_ci * @atomicservice 573761847f8eSopenharmony_ci * @since 11 573861847f8eSopenharmony_ci */ 573961847f8eSopenharmony_ci width: number; 574061847f8eSopenharmony_ci 574161847f8eSopenharmony_ci /** 574261847f8eSopenharmony_ci * Exports rendered content as an ImageBitmap object 574361847f8eSopenharmony_ci * 574461847f8eSopenharmony_ci * @returns { ImageBitmap } 574561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 574661847f8eSopenharmony_ci * @since 8 574761847f8eSopenharmony_ci */ 574861847f8eSopenharmony_ci /** 574961847f8eSopenharmony_ci * Exports rendered content as an ImageBitmap object 575061847f8eSopenharmony_ci * 575161847f8eSopenharmony_ci * @returns { ImageBitmap } 575261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 575361847f8eSopenharmony_ci * @form 575461847f8eSopenharmony_ci * @since 9 575561847f8eSopenharmony_ci */ 575661847f8eSopenharmony_ci /** 575761847f8eSopenharmony_ci * Exports rendered content as an ImageBitmap object 575861847f8eSopenharmony_ci * 575961847f8eSopenharmony_ci * @returns { ImageBitmap } 576061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 576161847f8eSopenharmony_ci * @crossplatform 576261847f8eSopenharmony_ci * @form 576361847f8eSopenharmony_ci * @since 10 576461847f8eSopenharmony_ci */ 576561847f8eSopenharmony_ci /** 576661847f8eSopenharmony_ci * Exports rendered content as an ImageBitmap object 576761847f8eSopenharmony_ci * 576861847f8eSopenharmony_ci * @returns { ImageBitmap } 576961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 577061847f8eSopenharmony_ci * @crossplatform 577161847f8eSopenharmony_ci * @form 577261847f8eSopenharmony_ci * @atomicservice 577361847f8eSopenharmony_ci * @since 11 577461847f8eSopenharmony_ci */ 577561847f8eSopenharmony_ci transferToImageBitmap(): ImageBitmap; 577661847f8eSopenharmony_ci 577761847f8eSopenharmony_ci /** 577861847f8eSopenharmony_ci * Creates the context from the current OffscreenCanvas. 577961847f8eSopenharmony_ci * 578061847f8eSopenharmony_ci * @param { "2d" } contextType - The context type, only "2d" be supported now. 578161847f8eSopenharmony_ci * "2d": Creates a {@link OffscreenCanvasRenderingContext2D} object representing a two-dimensional rendering context. 578261847f8eSopenharmony_ci * @param { RenderingContextSettings } options - Drawing attribute. For details, see {@link RenderingContextSettings}. 578361847f8eSopenharmony_ci * @returns { OffscreenCanvasRenderingContext2D } The rendering context of offscreen canvas, see {@link OffscreenCanvasRenderingContext2D}. 578461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 578561847f8eSopenharmony_ci * @crossplatform 578661847f8eSopenharmony_ci * @since 10 578761847f8eSopenharmony_ci */ 578861847f8eSopenharmony_ci /** 578961847f8eSopenharmony_ci * Creates the context from the current OffscreenCanvas. 579061847f8eSopenharmony_ci * 579161847f8eSopenharmony_ci * @param { "2d" } contextType - The context type, only "2d" be supported now. 579261847f8eSopenharmony_ci * "2d": Creates a {@link OffscreenCanvasRenderingContext2D} object representing a two-dimensional rendering context. 579361847f8eSopenharmony_ci * @param { RenderingContextSettings } options - Drawing attribute. For details, see {@link RenderingContextSettings}. 579461847f8eSopenharmony_ci * @returns { OffscreenCanvasRenderingContext2D } The rendering context of offscreen canvas, see {@link OffscreenCanvasRenderingContext2D}. 579561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 579661847f8eSopenharmony_ci * @crossplatform 579761847f8eSopenharmony_ci * @atomicservice 579861847f8eSopenharmony_ci * @since 11 579961847f8eSopenharmony_ci */ 580061847f8eSopenharmony_ci getContext(contextType: "2d", options?: RenderingContextSettings): OffscreenCanvasRenderingContext2D; 580161847f8eSopenharmony_ci 580261847f8eSopenharmony_ci /** 580361847f8eSopenharmony_ci * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. 580461847f8eSopenharmony_ci * 580561847f8eSopenharmony_ci * @param { number } width - Width of the off-screen canvas. 580661847f8eSopenharmony_ci * @param { number } height - Height of the off-screen canvas. 580761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 580861847f8eSopenharmony_ci * @since 8 580961847f8eSopenharmony_ci */ 581061847f8eSopenharmony_ci /** 581161847f8eSopenharmony_ci * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. 581261847f8eSopenharmony_ci * 581361847f8eSopenharmony_ci * @param { number } width - Width of the off-screen canvas. 581461847f8eSopenharmony_ci * @param { number } height - Height of the off-screen canvas. 581561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 581661847f8eSopenharmony_ci * @form 581761847f8eSopenharmony_ci * @since 9 581861847f8eSopenharmony_ci */ 581961847f8eSopenharmony_ci /** 582061847f8eSopenharmony_ci * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. 582161847f8eSopenharmony_ci * 582261847f8eSopenharmony_ci * @param { number } width - Width of the off-screen canvas. 582361847f8eSopenharmony_ci * @param { number } height - Height of the off-screen canvas. 582461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 582561847f8eSopenharmony_ci * @crossplatform 582661847f8eSopenharmony_ci * @form 582761847f8eSopenharmony_ci * @since 10 582861847f8eSopenharmony_ci */ 582961847f8eSopenharmony_ci /** 583061847f8eSopenharmony_ci * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. 583161847f8eSopenharmony_ci * 583261847f8eSopenharmony_ci * @param { number } width - Width of the off-screen canvas. 583361847f8eSopenharmony_ci * @param { number } height - Height of the off-screen canvas. 583461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 583561847f8eSopenharmony_ci * @crossplatform 583661847f8eSopenharmony_ci * @form 583761847f8eSopenharmony_ci * @atomicservice 583861847f8eSopenharmony_ci * @since 11 583961847f8eSopenharmony_ci */ 584061847f8eSopenharmony_ci constructor(width: number, height: number); 584161847f8eSopenharmony_ci 584261847f8eSopenharmony_ci /** 584361847f8eSopenharmony_ci * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. 584461847f8eSopenharmony_ci * 584561847f8eSopenharmony_ci * @param { number } width - Width of the off-screen canvas. 584661847f8eSopenharmony_ci * @param { number } height - Height of the off-screen canvas. 584761847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 584861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 584961847f8eSopenharmony_ci * @crossplatform 585061847f8eSopenharmony_ci * @form 585161847f8eSopenharmony_ci * @atomicservice 585261847f8eSopenharmony_ci * @since 12 585361847f8eSopenharmony_ci */ 585461847f8eSopenharmony_ci constructor(width: number, height: number, unit: LengthMetricsUnit); 585561847f8eSopenharmony_ci} 585661847f8eSopenharmony_ci 585761847f8eSopenharmony_ci/** 585861847f8eSopenharmony_ci * Size info. 585961847f8eSopenharmony_ci * 586061847f8eSopenharmony_ci * @interface Size 586161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 586261847f8eSopenharmony_ci * @crossplatform 586361847f8eSopenharmony_ci * @atomicservice 586461847f8eSopenharmony_ci * @since 12 586561847f8eSopenharmony_ci */ 586661847f8eSopenharmony_cideclare interface Size { 586761847f8eSopenharmony_ci /** 586861847f8eSopenharmony_ci * Defines the width property. 586961847f8eSopenharmony_ci * 587061847f8eSopenharmony_ci * @type { number } 587161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 587261847f8eSopenharmony_ci * @crossplatform 587361847f8eSopenharmony_ci * @atomicservice 587461847f8eSopenharmony_ci * @since 12 587561847f8eSopenharmony_ci */ 587661847f8eSopenharmony_ci width: number; 587761847f8eSopenharmony_ci 587861847f8eSopenharmony_ci /** 587961847f8eSopenharmony_ci * Defines the height property. 588061847f8eSopenharmony_ci * 588161847f8eSopenharmony_ci * @type { number } 588261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 588361847f8eSopenharmony_ci * @crossplatform 588461847f8eSopenharmony_ci * @atomicservice 588561847f8eSopenharmony_ci * @since 12 588661847f8eSopenharmony_ci */ 588761847f8eSopenharmony_ci height: number; 588861847f8eSopenharmony_ci} 588961847f8eSopenharmony_ci 589061847f8eSopenharmony_ci/** 589161847f8eSopenharmony_ci * Defines DrawingRenderingContext. 589261847f8eSopenharmony_ci * 589361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 589461847f8eSopenharmony_ci * @crossplatform 589561847f8eSopenharmony_ci * @atomicservice 589661847f8eSopenharmony_ci * @since 12 589761847f8eSopenharmony_ci */ 589861847f8eSopenharmony_cideclare class DrawingRenderingContext { 589961847f8eSopenharmony_ci 590061847f8eSopenharmony_ci /** 590161847f8eSopenharmony_ci * Get size of the DrawingRenderingContext. 590261847f8eSopenharmony_ci * 590361847f8eSopenharmony_ci * @returns { Size } The size of the DrawingRenderingContext. 590461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 590561847f8eSopenharmony_ci * @crossplatform 590661847f8eSopenharmony_ci * @atomicservice 590761847f8eSopenharmony_ci * @since 12 590861847f8eSopenharmony_ci */ 590961847f8eSopenharmony_ci get size(): Size; 591061847f8eSopenharmony_ci 591161847f8eSopenharmony_ci /** 591261847f8eSopenharmony_ci * Get canvas of the DrawingRenderingContext. 591361847f8eSopenharmony_ci * 591461847f8eSopenharmony_ci * @returns { DrawingCanvas } The canvas of the DrawingRenderingContext. 591561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 591661847f8eSopenharmony_ci * @crossplatform 591761847f8eSopenharmony_ci * @atomicservice 591861847f8eSopenharmony_ci * @since 12 591961847f8eSopenharmony_ci */ 592061847f8eSopenharmony_ci get canvas(): DrawingCanvas; 592161847f8eSopenharmony_ci 592261847f8eSopenharmony_ci /** 592361847f8eSopenharmony_ci * Invalidate the component, which will cause a re-render of the component. 592461847f8eSopenharmony_ci * 592561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 592661847f8eSopenharmony_ci * @crossplatform 592761847f8eSopenharmony_ci * @atomicservice 592861847f8eSopenharmony_ci * @since 12 592961847f8eSopenharmony_ci */ 593061847f8eSopenharmony_ci invalidate(): void; 593161847f8eSopenharmony_ci 593261847f8eSopenharmony_ci /** 593361847f8eSopenharmony_ci * Create DrawingRenderingContext with setting LengthMetricsUnit. 593461847f8eSopenharmony_ci * 593561847f8eSopenharmony_ci * @param { LengthMetricsUnit } [unit] - the unit mode 593661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 593761847f8eSopenharmony_ci * @crossplatform 593861847f8eSopenharmony_ci * @form 593961847f8eSopenharmony_ci * @atomicservice 594061847f8eSopenharmony_ci * @since 12 594161847f8eSopenharmony_ci */ 594261847f8eSopenharmony_ci constructor(unit?: LengthMetricsUnit); 594361847f8eSopenharmony_ci} 594461847f8eSopenharmony_ci 594561847f8eSopenharmony_ci/** 594661847f8eSopenharmony_ci *TextTimer component, which provides the text timer capability. 594761847f8eSopenharmony_ci * 594861847f8eSopenharmony_ci * @interface CanvasInterface 594961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 595061847f8eSopenharmony_ci * @since 8 595161847f8eSopenharmony_ci */ 595261847f8eSopenharmony_ci/** 595361847f8eSopenharmony_ci *TextTimer component, which provides the text timer capability. 595461847f8eSopenharmony_ci * 595561847f8eSopenharmony_ci * @interface CanvasInterface 595661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 595761847f8eSopenharmony_ci * @form 595861847f8eSopenharmony_ci * @since 9 595961847f8eSopenharmony_ci */ 596061847f8eSopenharmony_ci/** 596161847f8eSopenharmony_ci *TextTimer component, which provides the text timer capability. 596261847f8eSopenharmony_ci * 596361847f8eSopenharmony_ci * @interface CanvasInterface 596461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 596561847f8eSopenharmony_ci * @crossplatform 596661847f8eSopenharmony_ci * @form 596761847f8eSopenharmony_ci * @since 10 596861847f8eSopenharmony_ci */ 596961847f8eSopenharmony_ci/** 597061847f8eSopenharmony_ci *TextTimer component, which provides the text timer capability. 597161847f8eSopenharmony_ci * 597261847f8eSopenharmony_ci * @interface CanvasInterface 597361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 597461847f8eSopenharmony_ci * @crossplatform 597561847f8eSopenharmony_ci * @form 597661847f8eSopenharmony_ci * @atomicservice 597761847f8eSopenharmony_ci * @since 11 597861847f8eSopenharmony_ci */ 597961847f8eSopenharmony_ciinterface CanvasInterface { 598061847f8eSopenharmony_ci /** 598161847f8eSopenharmony_ci * Construct a canvas component. 598261847f8eSopenharmony_ci * 598361847f8eSopenharmony_ci * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}. 598461847f8eSopenharmony_ci * @returns { CanvasAttribute } 598561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 598661847f8eSopenharmony_ci * @since 8 598761847f8eSopenharmony_ci */ 598861847f8eSopenharmony_ci /** 598961847f8eSopenharmony_ci * Construct a canvas component. 599061847f8eSopenharmony_ci * 599161847f8eSopenharmony_ci * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}. 599261847f8eSopenharmony_ci * @returns { CanvasAttribute } 599361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 599461847f8eSopenharmony_ci * @form 599561847f8eSopenharmony_ci * @since 9 599661847f8eSopenharmony_ci */ 599761847f8eSopenharmony_ci /** 599861847f8eSopenharmony_ci * Construct a canvas component. 599961847f8eSopenharmony_ci * 600061847f8eSopenharmony_ci * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}. 600161847f8eSopenharmony_ci * @returns { CanvasAttribute } 600261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 600361847f8eSopenharmony_ci * @crossplatform 600461847f8eSopenharmony_ci * @form 600561847f8eSopenharmony_ci * @since 10 600661847f8eSopenharmony_ci */ 600761847f8eSopenharmony_ci /** 600861847f8eSopenharmony_ci * Construct a canvas component. 600961847f8eSopenharmony_ci * 601061847f8eSopenharmony_ci * @param { CanvasRenderingContext2D } context - Canvas context object. For details, see {@link CanvasRenderingContext2D}. 601161847f8eSopenharmony_ci * @returns { CanvasAttribute } 601261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 601361847f8eSopenharmony_ci * @crossplatform 601461847f8eSopenharmony_ci * @form 601561847f8eSopenharmony_ci * @atomicservice 601661847f8eSopenharmony_ci * @since 11 601761847f8eSopenharmony_ci */ 601861847f8eSopenharmony_ci /** 601961847f8eSopenharmony_ci * Construct a canvas component. 602061847f8eSopenharmony_ci * 602161847f8eSopenharmony_ci * @param { CanvasRenderingContext2D | DrawingRenderingContext } context - Canvas context object. 602261847f8eSopenharmony_ci * @returns { CanvasAttribute } 602361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 602461847f8eSopenharmony_ci * @crossplatform 602561847f8eSopenharmony_ci * @form 602661847f8eSopenharmony_ci * @atomicservice 602761847f8eSopenharmony_ci * @since 12 602861847f8eSopenharmony_ci */ 602961847f8eSopenharmony_ci (context?: CanvasRenderingContext2D | DrawingRenderingContext): CanvasAttribute; 603061847f8eSopenharmony_ci 603161847f8eSopenharmony_ci /** 603261847f8eSopenharmony_ci * Construct a canvas component. 603361847f8eSopenharmony_ci * 603461847f8eSopenharmony_ci * @param { CanvasRenderingContext2D | DrawingRenderingContext } context - Canvas context object. 603561847f8eSopenharmony_ci * @param { ImageAIOptions } imageAIOptions 603661847f8eSopenharmony_ci * @returns { CanvasAttribute } 603761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 603861847f8eSopenharmony_ci * @atomicservice 603961847f8eSopenharmony_ci * @since 12 604061847f8eSopenharmony_ci */ 604161847f8eSopenharmony_ci (context: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions: ImageAIOptions): CanvasAttribute; 604261847f8eSopenharmony_ci} 604361847f8eSopenharmony_ci 604461847f8eSopenharmony_ci/** 604561847f8eSopenharmony_ci * Provides attribute for Canvas. 604661847f8eSopenharmony_ci * 604761847f8eSopenharmony_ci * @extends CommonMethod<CanvasAttribute> 604861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 604961847f8eSopenharmony_ci * @since 8 605061847f8eSopenharmony_ci */ 605161847f8eSopenharmony_ci/** 605261847f8eSopenharmony_ci * Provides attribute for Canvas. 605361847f8eSopenharmony_ci * 605461847f8eSopenharmony_ci * @extends CommonMethod<CanvasAttribute> 605561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 605661847f8eSopenharmony_ci * @form 605761847f8eSopenharmony_ci * @since 9 605861847f8eSopenharmony_ci */ 605961847f8eSopenharmony_ci/** 606061847f8eSopenharmony_ci * Provides attribute for Canvas. 606161847f8eSopenharmony_ci * 606261847f8eSopenharmony_ci * @extends CommonMethod<CanvasAttribute> 606361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 606461847f8eSopenharmony_ci * @crossplatform 606561847f8eSopenharmony_ci * @form 606661847f8eSopenharmony_ci * @since 10 606761847f8eSopenharmony_ci */ 606861847f8eSopenharmony_ci/** 606961847f8eSopenharmony_ci * Provides attribute for Canvas. 607061847f8eSopenharmony_ci * 607161847f8eSopenharmony_ci * @extends CommonMethod<CanvasAttribute> 607261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 607361847f8eSopenharmony_ci * @crossplatform 607461847f8eSopenharmony_ci * @form 607561847f8eSopenharmony_ci * @atomicservice 607661847f8eSopenharmony_ci * @since 11 607761847f8eSopenharmony_ci */ 607861847f8eSopenharmony_cideclare class CanvasAttribute extends CommonMethod<CanvasAttribute> { 607961847f8eSopenharmony_ci /** 608061847f8eSopenharmony_ci * Event notification after the canvas component is constructed. You can draw the canvas at this time. 608161847f8eSopenharmony_ci * 608261847f8eSopenharmony_ci * @param { function } event 608361847f8eSopenharmony_ci * @returns { CanvasAttribute } 608461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 608561847f8eSopenharmony_ci * @since 8 608661847f8eSopenharmony_ci */ 608761847f8eSopenharmony_ci /** 608861847f8eSopenharmony_ci * Event notification after the canvas component is constructed. You can draw the canvas at this time. 608961847f8eSopenharmony_ci * 609061847f8eSopenharmony_ci * @param { function } event 609161847f8eSopenharmony_ci * @returns { CanvasAttribute } 609261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 609361847f8eSopenharmony_ci * @form 609461847f8eSopenharmony_ci * @since 9 609561847f8eSopenharmony_ci */ 609661847f8eSopenharmony_ci /** 609761847f8eSopenharmony_ci * Event notification after the canvas component is constructed. You can draw the canvas at this time. 609861847f8eSopenharmony_ci * 609961847f8eSopenharmony_ci * @param { function } event 610061847f8eSopenharmony_ci * @returns { CanvasAttribute } 610161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 610261847f8eSopenharmony_ci * @crossplatform 610361847f8eSopenharmony_ci * @form 610461847f8eSopenharmony_ci * @since 10 610561847f8eSopenharmony_ci */ 610661847f8eSopenharmony_ci /** 610761847f8eSopenharmony_ci * Event notification after the canvas component is constructed. You can draw the canvas at this time. 610861847f8eSopenharmony_ci * 610961847f8eSopenharmony_ci * @param { function } event 611061847f8eSopenharmony_ci * @returns { CanvasAttribute } 611161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 611261847f8eSopenharmony_ci * @crossplatform 611361847f8eSopenharmony_ci * @form 611461847f8eSopenharmony_ci * @atomicservice 611561847f8eSopenharmony_ci * @since 11 611661847f8eSopenharmony_ci */ 611761847f8eSopenharmony_ci /** 611861847f8eSopenharmony_ci * Event notification after the canvas component is constructed. You can draw the canvas at this time. 611961847f8eSopenharmony_ci * 612061847f8eSopenharmony_ci * @param { VoidCallback } event 612161847f8eSopenharmony_ci * @returns { CanvasAttribute } 612261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 612361847f8eSopenharmony_ci * @crossplatform 612461847f8eSopenharmony_ci * @form 612561847f8eSopenharmony_ci * @atomicservice 612661847f8eSopenharmony_ci * @since 14 612761847f8eSopenharmony_ci */ 612861847f8eSopenharmony_ci onReady(event: VoidCallback): CanvasAttribute; 612961847f8eSopenharmony_ci 613061847f8eSopenharmony_ci /** 613161847f8eSopenharmony_ci * Enable image analyzer for Canvas. 613261847f8eSopenharmony_ci * 613361847f8eSopenharmony_ci * @param { boolean } enable - If enable image analyzer for Canvas. The default value is false. 613461847f8eSopenharmony_ci * @returns { CanvasAttribute } 613561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 613661847f8eSopenharmony_ci * @atomicservice 613761847f8eSopenharmony_ci * @since 12 613861847f8eSopenharmony_ci */ 613961847f8eSopenharmony_ci enableAnalyzer(enable: boolean): CanvasAttribute; 614061847f8eSopenharmony_ci} 614161847f8eSopenharmony_ci 614261847f8eSopenharmony_ci/** 614361847f8eSopenharmony_ci * Defines Canvas Component. 614461847f8eSopenharmony_ci * 614561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 614661847f8eSopenharmony_ci * @since 8 614761847f8eSopenharmony_ci */ 614861847f8eSopenharmony_ci/** 614961847f8eSopenharmony_ci * Defines Canvas Component. 615061847f8eSopenharmony_ci * 615161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 615261847f8eSopenharmony_ci * @form 615361847f8eSopenharmony_ci * @since 9 615461847f8eSopenharmony_ci */ 615561847f8eSopenharmony_ci/** 615661847f8eSopenharmony_ci * Defines Canvas Component. 615761847f8eSopenharmony_ci * 615861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 615961847f8eSopenharmony_ci * @crossplatform 616061847f8eSopenharmony_ci * @form 616161847f8eSopenharmony_ci * @since 10 616261847f8eSopenharmony_ci */ 616361847f8eSopenharmony_ci/** 616461847f8eSopenharmony_ci * Defines Canvas Component. 616561847f8eSopenharmony_ci * 616661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 616761847f8eSopenharmony_ci * @crossplatform 616861847f8eSopenharmony_ci * @form 616961847f8eSopenharmony_ci * @atomicservice 617061847f8eSopenharmony_ci * @since 11 617161847f8eSopenharmony_ci */ 617261847f8eSopenharmony_cideclare const Canvas: CanvasInterface; 617361847f8eSopenharmony_ci 617461847f8eSopenharmony_ci/** 617561847f8eSopenharmony_ci * Defines Canvas Component instance. 617661847f8eSopenharmony_ci * 617761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 617861847f8eSopenharmony_ci * @since 8 617961847f8eSopenharmony_ci */ 618061847f8eSopenharmony_ci/** 618161847f8eSopenharmony_ci * Defines Canvas Component instance. 618261847f8eSopenharmony_ci * 618361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 618461847f8eSopenharmony_ci * @form 618561847f8eSopenharmony_ci * @since 9 618661847f8eSopenharmony_ci */ 618761847f8eSopenharmony_ci/** 618861847f8eSopenharmony_ci * Defines Canvas Component instance. 618961847f8eSopenharmony_ci * 619061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 619161847f8eSopenharmony_ci * @crossplatform 619261847f8eSopenharmony_ci * @form 619361847f8eSopenharmony_ci * @since 10 619461847f8eSopenharmony_ci */ 619561847f8eSopenharmony_ci/** 619661847f8eSopenharmony_ci * Defines Canvas Component instance. 619761847f8eSopenharmony_ci * 619861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 619961847f8eSopenharmony_ci * @crossplatform 620061847f8eSopenharmony_ci * @form 620161847f8eSopenharmony_ci * @atomicservice 620261847f8eSopenharmony_ci * @since 11 620361847f8eSopenharmony_ci */ 620461847f8eSopenharmony_cideclare const CanvasInstance: CanvasAttribute; 6205