From 95cc1aaba8d1bdb455d5fb7271cade46f8222700 Mon Sep 17 00:00:00 2001 From: PengKejie Date: Tue, 24 Jun 2025 11:53:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=A8=E9=87=8F=E6=94=AF=E6=8C=81ArkTs1.?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: PengKejie --- api/@ohos.graphics.text.d.ts | 395 ++++++++++------------------------- 1 file changed, 115 insertions(+), 280 deletions(-) diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index 9c176caa88..70373a8731 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit ArkGraphics2D + * @arkts 1.1&1.2 */ import type drawing from './@ohos.graphics.drawing'; import type common2D from './@ohos.graphics.common2D'; @@ -29,7 +30,6 @@ import { Resource } from './global/resource'; * @namespace text * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ declare namespace text { @@ -38,14 +38,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum TextAlign { /** * Use the left side of the text as a reference line for alignment. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ LEFT = 0, @@ -53,7 +51,6 @@ declare namespace text { * Use the right side of the text as a reference line for alignment. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ RIGHT = 1, @@ -61,7 +58,6 @@ declare namespace text { * Use the midpoint line the text as a reference line for alignment. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ CENTER = 2, @@ -69,7 +65,6 @@ declare namespace text { * Align the text at the start and end of the line. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ JUSTIFY = 3, @@ -77,7 +72,6 @@ declare namespace text { * Align text from start, based on the direction of text, such as left-to-right or right-to-left. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ START = 4, @@ -85,7 +79,6 @@ declare namespace text { * Align text from end, based on the direction of text, such as left-to-right or right-to-left, opposite to START. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ END = 5, } @@ -95,14 +88,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum TextDirection { /** * The text is oriented from right to left. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ RTL, @@ -110,7 +101,6 @@ declare namespace text { * The text is oriented from left to right. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ LTR, } @@ -120,14 +110,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum BreakStrategy { /** * The segmentation strategy is greedy. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ GREEDY, @@ -135,7 +123,6 @@ declare namespace text { * The segmentation strategy is high quality. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ HIGH_QUALITY, @@ -143,7 +130,6 @@ declare namespace text { * The segmentation strategy is balanced. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ BALANCED, } @@ -153,14 +139,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum WordBreak { /** * Normal word break strategy. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ NORMAL, @@ -168,7 +152,6 @@ declare namespace text { * Breaks word by character. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ BREAK_ALL, @@ -176,7 +159,6 @@ declare namespace text { * Breaks word by phrase. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ BREAK_WORD, @@ -184,7 +166,6 @@ declare namespace text { * Breaks word by hyphen. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 */ BREAK_HYPHEN, } @@ -194,7 +175,6 @@ declare namespace text { * @typedef Decoration * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface Decoration { /** @@ -202,7 +182,6 @@ declare namespace text { * @type { ?TextDecorationType } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ textDecoration?: TextDecorationType; @@ -211,7 +190,6 @@ declare namespace text { * @type { ?common2D.Color } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ color?: common2D.Color; @@ -220,7 +198,6 @@ declare namespace text { * @type { ?TextDecorationStyle } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ decorationStyle?: TextDecorationStyle; @@ -229,7 +206,6 @@ declare namespace text { * @type { ?number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ decorationThicknessScale?: number; } @@ -239,14 +215,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum TextDecorationType { /** * There are no text decoration. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ NONE, @@ -254,7 +228,6 @@ declare namespace text { * There is a decoration line below the text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ UNDERLINE, @@ -262,7 +235,6 @@ declare namespace text { * There is a decoration line above the text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ OVERLINE, @@ -270,7 +242,6 @@ declare namespace text { * There is a decoration line through the middle of the text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ LINE_THROUGH, } @@ -280,14 +251,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum TextDecorationStyle { /** * Decoration line is solid line. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ SOLID, @@ -295,7 +264,6 @@ declare namespace text { * Decoration line is double line. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ DOUBLE, @@ -303,7 +271,6 @@ declare namespace text { * Decoration line is dotted line. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ DOTTED, @@ -311,7 +278,6 @@ declare namespace text { * Decoration line is dashed line. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ DASHED, @@ -319,7 +285,6 @@ declare namespace text { * Decoration line is wavy line. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ WAVY, } @@ -329,14 +294,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum FontWeight { /** * Thin * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W100, @@ -344,7 +307,6 @@ declare namespace text { * Extra-light * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W200, @@ -352,7 +314,6 @@ declare namespace text { * Light * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W300, @@ -360,7 +321,6 @@ declare namespace text { * Normal/Regular * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W400, @@ -368,7 +328,6 @@ declare namespace text { * Medium * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W500, @@ -376,7 +335,6 @@ declare namespace text { * Semi-bold * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W600, @@ -384,7 +342,6 @@ declare namespace text { * Bold * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W700, @@ -392,7 +349,6 @@ declare namespace text { * Extra-bold * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W800, @@ -400,7 +356,6 @@ declare namespace text { * Black * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ W900, } @@ -410,14 +365,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum FontStyle { /** * Upright font type. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ NORMAL, @@ -425,7 +378,6 @@ declare namespace text { * Slant font. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ITALIC, @@ -433,7 +385,6 @@ declare namespace text { * Oblique font. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ OBLIQUE, } @@ -443,14 +394,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum FontWidth { /** * Ultra condensed font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ULTRA_CONDENSED = 1, @@ -458,7 +407,6 @@ declare namespace text { * Extra condensed font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ EXTRA_CONDENSED = 2, @@ -466,7 +414,6 @@ declare namespace text { * Condensed font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ CONDENSED = 3, @@ -474,7 +421,6 @@ declare namespace text { * Semi condensed font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ SEMI_CONDENSED = 4, @@ -482,7 +428,6 @@ declare namespace text { * Normal font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ NORMAL = 5, @@ -490,7 +435,6 @@ declare namespace text { * Semi expanded font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ SEMI_EXPANDED = 6, @@ -498,7 +442,6 @@ declare namespace text { * Expanded font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ EXPANDED = 7, @@ -506,7 +449,6 @@ declare namespace text { * Extra expanded font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ EXTRA_EXPANDED = 8, @@ -514,7 +456,6 @@ declare namespace text { * Ultra expanded font width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ULTRA_EXPANDED = 9, } @@ -524,14 +465,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum TextHeightBehavior { /** * Both ascend of first row and last row style. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ALL = 0x0, @@ -539,7 +478,6 @@ declare namespace text { * Forbidding ascend of first row style. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ DISABLE_FIRST_ASCENT = 0x1, @@ -547,7 +485,6 @@ declare namespace text { * Forbidding ascend of last row style. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ DISABLE_LAST_ASCENT = 0x2, @@ -555,7 +492,6 @@ declare namespace text { * Neither ascend of first row nor last row style. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ DISABLE_ALL = 0x1 | 0x2, } @@ -565,7 +501,6 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum TextBaseline { /** @@ -573,7 +508,6 @@ declare namespace text { * with the base of lowercase letters. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ALPHABETIC, @@ -582,7 +516,6 @@ declare namespace text { * where the baseline aligns with the center of characters. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ IDEOGRAPHIC, } @@ -592,14 +525,12 @@ declare namespace text { * @enum { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enum EllipsisMode { /** * The ellipsis is shown in the start of text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ START, @@ -607,7 +538,6 @@ declare namespace text { * The ellipsis is shown in the middle of text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ MIDDLE, @@ -615,7 +545,6 @@ declare namespace text { * The ellipsis is shown in the end of text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ END, } @@ -625,7 +554,6 @@ declare namespace text { * @typedef TextShadow * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface TextShadow { /** @@ -633,7 +561,6 @@ declare namespace text { * @type { ?common2D.Color } The color of text shadow * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ color?: common2D.Color; /** @@ -641,7 +568,6 @@ declare namespace text { * @type { ?common2D.Point } The point of shadow * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ point?: common2D.Point; /** @@ -649,7 +575,6 @@ declare namespace text { * @type { ?number } The value about radius of blur, it type is "double" * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ blurRadius?: number; } @@ -659,7 +584,6 @@ declare namespace text { * @typedef RectStyle * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface RectStyle { /** @@ -667,7 +591,6 @@ declare namespace text { * @type { common2D.Color } The color of rect style * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ color: common2D.Color; @@ -676,7 +599,6 @@ declare namespace text { * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ leftTopRadius: number; @@ -685,7 +607,6 @@ declare namespace text { * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ rightTopRadius: number; @@ -694,7 +615,6 @@ declare namespace text { * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ rightBottomRadius: number; @@ -703,7 +623,6 @@ declare namespace text { * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ leftBottomRadius: number; } @@ -713,7 +632,6 @@ declare namespace text { * @typedef FontFeature * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface FontFeature { /** @@ -721,7 +639,6 @@ declare namespace text { * @type { string } feature name * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ name: string; /** @@ -729,7 +646,6 @@ declare namespace text { * @type { number } feature value * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ value: number; } @@ -739,7 +655,6 @@ declare namespace text { * @typedef FontVariation * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface FontVariation { /** @@ -747,7 +662,6 @@ declare namespace text { * @type { string } variation axis * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ axis: string; /** @@ -755,7 +669,6 @@ declare namespace text { * @type { number } variation value * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ value: number; } @@ -765,7 +678,6 @@ declare namespace text { * @typedef TextStyle * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface TextStyle { @@ -774,7 +686,6 @@ declare namespace text { * @type { ?Decoration } decoration for text * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ decoration?: Decoration; @@ -783,7 +694,6 @@ declare namespace text { * @type { ?common2D.Color } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ color?: common2D.Color; @@ -792,7 +702,6 @@ declare namespace text { * @type { ?FontWeight } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontWeight?: FontWeight; @@ -801,7 +710,6 @@ declare namespace text { * @type { ?FontStyle } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -810,7 +718,6 @@ declare namespace text { * @type { ?TextBaseline } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ baseline?: TextBaseline; @@ -819,7 +726,6 @@ declare namespace text { * @type { ?Array } fontfamily gather * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontFamilies?: Array; @@ -828,7 +734,6 @@ declare namespace text { * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontSize?: number; @@ -837,7 +742,6 @@ declare namespace text { * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ letterSpacing?: number; @@ -846,7 +750,6 @@ declare namespace text { * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ wordSpacing?: number; @@ -855,7 +758,6 @@ declare namespace text { * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ heightScale?: number; @@ -864,7 +766,6 @@ declare namespace text { * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ halfLeading?: boolean; @@ -874,7 +775,6 @@ declare namespace text { * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ heightOnly?: boolean; @@ -883,7 +783,6 @@ declare namespace text { * @type { ?string } it is u16string type data. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ellipsis?: string; @@ -892,7 +791,6 @@ declare namespace text { * @type { ?EllipsisMode } Ellipsis mode. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ellipsisMode?: EllipsisMode; @@ -901,7 +799,6 @@ declare namespace text { * @type { ?string } it is string type data. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ locale?: string; @@ -910,7 +807,6 @@ declare namespace text { * @type { ?number } it is double type data. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ baselineShift?: number; @@ -919,7 +815,6 @@ declare namespace text { * @type { ?Array } A collection of font features. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontFeatures?: Array; @@ -928,7 +823,6 @@ declare namespace text { * @type { ?Array } textShadow gather. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ textShadows?: Array; @@ -937,7 +831,6 @@ declare namespace text { * @type { ?RectStyle } rect style for text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ backgroundRect?: RectStyle; @@ -946,7 +839,6 @@ declare namespace text { * @type { ?Array } A collection of font variations. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontVariations?: Array; } @@ -955,7 +847,6 @@ declare namespace text { * Provides the basis for graphics. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ class FontCollection { /** @@ -963,7 +854,6 @@ declare namespace text { * @returns { FontCollection } The FontCollection object. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ static getGlobalInstance(): FontCollection; @@ -973,7 +863,6 @@ declare namespace text { * @param { string | Resource } path - the path of the font file. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ loadFontSync(name: string, path: string | Resource): void; @@ -986,7 +875,6 @@ declare namespace text { *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 */ loadFont(name: string, path: string | Resource): Promise; @@ -994,9 +882,8 @@ declare namespace text { * Clear font caches. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ - clearCaches(): void; + clearCaches(): void; } /** @@ -1004,7 +891,6 @@ declare namespace text { * @typedef StrutStyle * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface StrutStyle { /** @@ -1012,7 +898,6 @@ declare namespace text { * @type { ?Array } fontfamily gather * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontFamilies?: Array; @@ -1021,7 +906,6 @@ declare namespace text { * @type { ?FontStyle } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -1030,7 +914,6 @@ declare namespace text { * @type { ?FontWidth } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontWidth?: FontWidth; @@ -1039,7 +922,6 @@ declare namespace text { * @type { ?FontWeight } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontWeight?: FontWeight; @@ -1048,7 +930,6 @@ declare namespace text { * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontSize?: number; @@ -1057,7 +938,6 @@ declare namespace text { * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ height?: number; @@ -1066,7 +946,6 @@ declare namespace text { * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ leading?: number; @@ -1075,7 +954,6 @@ declare namespace text { * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ forceHeight?: boolean; @@ -1084,7 +962,6 @@ declare namespace text { * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ enabled?: boolean; @@ -1093,7 +970,6 @@ declare namespace text { * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ heightOverride?: boolean; @@ -1102,7 +978,6 @@ declare namespace text { * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ halfLeading?: boolean; } @@ -1112,7 +987,6 @@ declare namespace text { * @typedef ParagraphStyle * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface ParagraphStyle { /** @@ -1120,7 +994,6 @@ declare namespace text { * @type { ?TextStyle } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ textStyle?: TextStyle; @@ -1129,7 +1002,6 @@ declare namespace text { * @type { ?TextDirection } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ textDirection?: TextDirection; @@ -1138,7 +1010,6 @@ declare namespace text { * @type { ?TextAlign } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ align?: TextAlign; @@ -1147,7 +1018,6 @@ declare namespace text { * @type { ?WordBreak } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ wordBreak?: WordBreak; @@ -1156,7 +1026,6 @@ declare namespace text { * @type { ?number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ maxLines?: number; @@ -1165,7 +1034,6 @@ declare namespace text { * @type { ?BreakStrategy } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ breakStrategy?: BreakStrategy; @@ -1174,7 +1042,6 @@ declare namespace text { * @type { ?StrutStyle } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ strutStyle?: StrutStyle; @@ -1183,7 +1050,6 @@ declare namespace text { * @type { ?TextHeightBehavior } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ textHeightBehavior?: TextHeightBehavior; @@ -1195,7 +1061,6 @@ declare namespace text { * @type { ?TextTab } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 */ tab?: TextTab; } @@ -1204,13 +1069,13 @@ declare namespace text { * Where to vertically align the placeholder relative to the surrounding text. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ enum PlaceholderAlignment { /** * Match the baseline of the placeholder with the baseline. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ OFFSET_AT_BASELINE, @@ -1218,7 +1083,7 @@ declare namespace text { * Align the bottom edge of the placeholder with the baseline such that the placeholder * sits on top of the baseline. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ ABOVE_BASELINE, @@ -1226,7 +1091,7 @@ declare namespace text { * Align the top edge of the placeholder with the baseline specified in such that the placeholder * hangs below the baseline. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ BELOW_BASELINE, @@ -1234,7 +1099,7 @@ declare namespace text { * Align the top edge of the placeholder with the top edge of the font. When the placeholder is very tall, * the extra space will hang from the top and extend through the bottom of the line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ TOP_OF_ROW_BOX, @@ -1242,7 +1107,7 @@ declare namespace text { * Align the bottom edge of the placeholder with the bottom edge of the text. When the placeholder is very tall, * the extra space will rise from the bottom and extend through the top of the line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ BOTTOM_OF_ROW_BOX, @@ -1250,7 +1115,7 @@ declare namespace text { * Align the middle of the placeholder with the middle of the text.When the placeholder is very tall, * the extra space will grow equally from the top and bottom of the line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ CENTER_OF_ROW_BOX, } @@ -1259,14 +1124,14 @@ declare namespace text { * Provide a description of placeholder scope in creating typography. * @typedef PlaceholderSpan * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ interface PlaceholderSpan { /** * The width of the placeholder. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ width: number; @@ -1274,7 +1139,7 @@ declare namespace text { * The height of the placeholder. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ height: number; @@ -1282,7 +1147,7 @@ declare namespace text { * Alignment mode of placeholder. * @type { PlaceholderAlignment } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ align: PlaceholderAlignment; @@ -1290,7 +1155,7 @@ declare namespace text { * Baseline of placeholder. * @type { TextBaseline } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ baseline: TextBaseline; @@ -1298,7 +1163,7 @@ declare namespace text { * Baseline offset of placeholder. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ baselineOffset: number; } @@ -1307,14 +1172,14 @@ declare namespace text { * Provides the definition of the range. * @typedef Range * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ interface Range { /** * Left index. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ start: number; @@ -1322,7 +1187,7 @@ declare namespace text { * Right index. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ end: number; } @@ -1331,41 +1196,41 @@ declare namespace text { * An enumeration of system font types. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ enum SystemFontType { /** * All font types. * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ ALL = 1 << 0, /** * System generic font type. * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ GENERIC = 1 << 1, /** * Stylish font type. * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ STYLISH = 1 << 2, /** * Installed font types. * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ INSTALLED = 1 << 3, /** * Customized font types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ CUSTOMIZED = 1 << 4, } @@ -1374,14 +1239,14 @@ declare namespace text { * Font descriptor * @typedef FontDescriptor * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ interface FontDescriptor { /** * Font file path * @type { ?string } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ path?: string; @@ -1389,7 +1254,7 @@ declare namespace text { * Font postScript name * @type { ?string } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ postScriptName?: string; @@ -1397,7 +1262,7 @@ declare namespace text { * Full font name * @type { ?string } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ fullName?: string; @@ -1405,7 +1270,7 @@ declare namespace text { * Font family name * @type { ?string } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ fontFamily?: string; @@ -1413,7 +1278,7 @@ declare namespace text { * Font subfamily name * @type { ?string } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ fontSubfamily?: string; @@ -1421,7 +1286,7 @@ declare namespace text { * Font weight * @type { ?FontWeight } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ weight?: FontWeight; @@ -1429,7 +1294,7 @@ declare namespace text { * Font width * @type { ?number } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ width?: number; @@ -1437,7 +1302,7 @@ declare namespace text { * Font slant, non-0 means italic. * @type { ?number } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ italic?: number; @@ -1445,7 +1310,7 @@ declare namespace text { * Whether the font is monospaced * @type { ?boolean } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ monoSpace?: boolean; @@ -1453,7 +1318,7 @@ declare namespace text { * Whether to support symbols * @type { ?boolean } * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ symbolic?: boolean; } @@ -1462,7 +1327,6 @@ declare namespace text { * A paragraph retains the size and position of each glyph in the text and can be efficiently resized and painted. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ class Paragraph { /** @@ -1470,7 +1334,6 @@ declare namespace text { * @param { number } width - Control how wide the text is allowed to be. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ layoutSync(width: number): void; @@ -1481,7 +1344,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ layout(width: number): Promise; @@ -1492,7 +1355,6 @@ declare namespace text { * @param { number } y - Represents the Y-axis position on the canvas. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ paint(canvas: drawing.Canvas, x: number, y: number): void; @@ -1504,7 +1366,6 @@ declare namespace text { * @param { number } vOffset - Vertical offset along the path. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ paintOnPath(canvas: drawing.Canvas, path: drawing.Path, hOffset: number, vOffset: number): void; @@ -1512,7 +1373,7 @@ declare namespace text { * Get max width of horizontal space this paragraph occupied. * @returns { number } Max width of horizontal space. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getMaxWidth(): number; @@ -1520,7 +1381,7 @@ declare namespace text { * Get height of horizontal space this paragraph occupies. * @returns { number } Height of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getHeight(): number; @@ -1529,7 +1390,6 @@ declare namespace text { * @returns { number } The longest line of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ getLongestLine(): number; @@ -1538,7 +1398,7 @@ declare namespace text { * of indent. * @returns { number } The longest line with indent of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} */ getLongestLineWithIndent(): number; @@ -1546,7 +1406,7 @@ declare namespace text { * Get the min intrinsic width of horizontal space this paragraph occupies. * @returns { number } The min intrinsic width of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getMinIntrinsicWidth(): number; @@ -1554,7 +1414,7 @@ declare namespace text { * Get the max intrinsic width. * @returns { number } Intrinsic Width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getMaxIntrinsicWidth(): number; @@ -1562,7 +1422,7 @@ declare namespace text { * Get the alphabetic baseline. * @returns { number } Alphabetic Baseline. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getAlphabeticBaseline(): number; @@ -1570,7 +1430,7 @@ declare namespace text { * Get the ideographic baseline. * @returns { number } Ideographic Baseline. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getIdeographicBaseline(): number; @@ -1581,7 +1441,7 @@ declare namespace text { * @param { RectHeightStyle } heightStyle - Height style to set. * @returns { Array } The rects for range. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getRectsForRange(range: Range, widthStyle: RectWidthStyle, heightStyle: RectHeightStyle): Array; @@ -1589,7 +1449,7 @@ declare namespace text { * Get the rects for placeholders. * @returns { Array } The rects for placeholders. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getRectsForPlaceholders(): Array; @@ -1599,7 +1459,7 @@ declare namespace text { * @param { number } y - the positionY of typography to set. * @returns { PositionWithAffinity } TextBlob object. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getGlyphPositionAtCoordinate(x: number, y: number): PositionWithAffinity; @@ -1608,7 +1468,7 @@ declare namespace text { * @param { number } offset - offset value * @returns { Range } The range value returned to the caller. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getWordBoundary(offset: number): Range; @@ -1616,7 +1476,7 @@ declare namespace text { * Get line count. * @returns { number } The line count value returned to the caller. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getLineCount(): number; @@ -1625,7 +1485,7 @@ declare namespace text { * @param { number } line - line number * @returns { number } The line height value returned to the caller. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getLineHeight(line: number): number; @@ -1634,7 +1494,7 @@ declare namespace text { * @param { number } line - line number * @returns { number } The line width value returned to the caller. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getLineWidth(line: number): number; @@ -1642,7 +1502,7 @@ declare namespace text { * Return whether it exceed the maximum lines of typography. * @returns { boolean } The true indicates exceeding, the false indicates not exceeding. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ didExceedMaxLines(): boolean; @@ -1650,7 +1510,7 @@ declare namespace text { * Get the text lines of paragraph. * @returns { Array } the tuple of TextLine. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getTextLines(): Array; @@ -1660,7 +1520,7 @@ declare namespace text { * @param { boolean } includeSpaces - indicates if the whitespaces should be included * @returns { Range } The range of text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getActualTextRange(lineNumber: number, includeSpaces: boolean): Range; @@ -1669,7 +1529,6 @@ declare namespace text { * @returns { Array } Array of line metrics. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ getLineMetrics(): Array; @@ -1679,7 +1538,6 @@ declare namespace text { * @returns { LineMetrics | undefined } line metrics. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ getLineMetrics(lineNumber: number): LineMetrics | undefined; } @@ -1687,7 +1545,7 @@ declare namespace text { /** * Provides the abilities to typeset by line. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ class LineTypeset { /** @@ -1698,7 +1556,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getLineBreak(startIndex: number, width: number): number; @@ -1710,7 +1568,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ createLine(startIndex: number, count: number): TextLine; } @@ -1719,14 +1577,14 @@ declare namespace text { * Box that contain text. * @typedef TextBox * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ interface TextBox{ /** * Rect of text box. * @type { common2D.Rect } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ rect: common2D.Rect; @@ -1734,7 +1592,7 @@ declare namespace text { * Text direction. * @type { TextDirection } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ direction: TextDirection; } @@ -1743,14 +1601,14 @@ declare namespace text { * Position and affinity. * @typedef PositionWithAffinity * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ interface PositionWithAffinity { /** * Position of text. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ position: number; @@ -1758,7 +1616,7 @@ declare namespace text { * Affinity of text. * @type { Affinity } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ affinity: Affinity; } @@ -1767,20 +1625,20 @@ declare namespace text { * Enumerates rect width style. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ enum RectWidthStyle { /** * Tight width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ TIGHT, /** * Max width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ MAX, } @@ -1789,13 +1647,13 @@ declare namespace text { * Enumerates rect height style. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ enum RectHeightStyle { /** * Provide tight bounding boxes that fit heights per run. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ TIGHT, @@ -1803,35 +1661,35 @@ declare namespace text { * The height of the boxes will be the maximum height of all runs in the line. All rects in the same * line will be the same height. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ MAX, /** * The top and bottom of each rect will cover half of the space above and half of the space below the line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ INCLUDE_LINE_SPACE_MIDDLE, /** * The line spacing will be added to the top of the rect. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ INCLUDE_LINE_SPACE_TOP, /** * The line spacing will be added to the bottom of the rect. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ INCLUDE_LINE_SPACE_BOTTOM, /** * The height of the boxes will be calculated by text strut. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ STRUT, } @@ -1842,20 +1700,20 @@ declare namespace text { * closer to. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ enum Affinity { /** * The position has affinity for the upstream side of the text position. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ UPSTREAM, /** * The position has affinity for the downstream side of the text position. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ DOWNSTREAM, } @@ -1864,7 +1722,6 @@ declare namespace text { * Builds a Paragraph containing text with the given styling information. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ class ParagraphBuilder { /** @@ -1872,7 +1729,7 @@ declare namespace text { * @param { ParagraphStyle } paragraphStyle - Paragraph style {@link ParagraphStyle} * @param { FontCollection } fontCollection - Font collection {@link FontCollection} * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ constructor(paragraphStyle: ParagraphStyle, fontCollection: FontCollection); @@ -1881,7 +1738,6 @@ declare namespace text { * @param { TextStyle } textStyle - Text style {@link TextStyle} * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ pushStyle(textStyle: TextStyle): void; @@ -1889,7 +1745,6 @@ declare namespace text { * Remove a style from the stack. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ popStyle(): void; @@ -1898,7 +1753,6 @@ declare namespace text { * @param { string } text - Text string * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ addText(text: string): void; @@ -1906,7 +1760,7 @@ declare namespace text { * Add placeholder. * @param { PlaceholderSpan } placeholderSpan - Placeholder Span {@link PlaceholderSpan} * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ addPlaceholder(placeholderSpan: PlaceholderSpan): void; @@ -1915,7 +1769,6 @@ declare namespace text { * @returns { Paragraph } The paragraph value returned to the caller. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ build(): Paragraph; @@ -1923,7 +1776,7 @@ declare namespace text { * Create LineTypeset object. * @returns { LineTypeset } The LineTypeset value returned to the caller. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ buildLineTypeset(): LineTypeset; @@ -1931,7 +1784,7 @@ declare namespace text { * Add symbolId. * @param { number } symbolId - Symbol Id * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ addSymbol(symbolId: number): void; } @@ -1940,14 +1793,14 @@ declare namespace text { * Provides the definition of the typographic bounds. * @typedef TypographicBounds * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ interface TypographicBounds { /** * Distance Retained Above Baseline. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ ascent: number; @@ -1955,7 +1808,7 @@ declare namespace text { * The distance that remains below the baseline. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ descent: number; @@ -1963,7 +1816,7 @@ declare namespace text { * Line Spacing. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ leading: number; @@ -1971,7 +1824,7 @@ declare namespace text { * The total width of the typesetting border. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ width: number; } @@ -1987,21 +1840,21 @@ declare namespace text { * @returns { boolean } The return value of the user-defined callback function. If false is returned, the traversal * continues. If true is returned, the traversal stops. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ type CaretOffsetsCallback = (offset: number, index: number, leadingEdge: boolean) => boolean; /** * The structure of text line that provides the basis of paragraph for graphics. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ class TextLine { /** * Get the count of glyphs. * @returns { number } The counts of glyphs. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getGlyphCount(): number; @@ -2009,7 +1862,7 @@ declare namespace text { * Get the range of text line. * @returns { Range } The range of text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getTextRange(): Range; @@ -2017,7 +1870,7 @@ declare namespace text { * Get the glyph runs of text line. * @returns { Array } The tuple of glyph runs of text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getGlyphRuns(): Array; @@ -2027,7 +1880,7 @@ declare namespace text { * @param { number } x - Represents the X-axis position on the canvas. * @param { number } y - Represents the Y-axis position on the canvas. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ paint(canvas: drawing.Canvas, x: number, y: number): void; @@ -2040,7 +1893,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ createTruncatedLine(width: number, ellipsisMode: EllipsisMode, ellipsis: string): TextLine; @@ -2048,7 +1901,7 @@ declare namespace text { * Gets the text line typographic bounds. * @returns { TypographicBounds } The text line of typographic bounds. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getTypographicBounds(): TypographicBounds; @@ -2056,7 +1909,7 @@ declare namespace text { * Gets the text line image bounds. * @returns { common2D.Rect } Rect of text line. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getImageBounds(): common2D.Rect; @@ -2064,7 +1917,7 @@ declare namespace text { * Gets the tail space width. * @returns { number } The tail space width. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getTrailingSpaceWidth(): number; @@ -2075,7 +1928,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getStringIndexForPosition(point: common2D.Point): number; @@ -2086,7 +1939,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getOffsetForStringIndex(index: number): number; @@ -2096,7 +1949,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ enumerateCaretOffsets(callback: CaretOffsetsCallback): void; @@ -2111,7 +1964,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getAlignmentOffset(alignmentFactor: number, alignmentWidth: number): number; } @@ -2119,14 +1972,14 @@ declare namespace text { /** * Independent rendering of text layout. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ class Run { /** * Gets the number of glyph. * @returns { number } The number of glyph. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getGlyphCount(): number; @@ -2134,7 +1987,7 @@ declare namespace text { * Gets the glyph identifier for each character. * @returns { Array } Glyph identifier. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getGlyphs(): Array; @@ -2146,7 +1999,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getGlyphs(range: Range): Array; @@ -2154,7 +2007,7 @@ declare namespace text { * Gets the font position offset. * @returns { Array } The position of the font in the layout. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getPositions(): Array; @@ -2166,15 +2019,15 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getPositions(range: Range): Array; - /** + /** * Gets the font position offset array. * @returns { Array } The position offset of the font in the layout. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getOffsets(): Array; @@ -2182,7 +2035,7 @@ declare namespace text { * Gets the font object instance. * @returns { drawing.Font } The font object instance. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ getFont(): drawing.Font; @@ -2192,7 +2045,7 @@ declare namespace text { * @param { number } x - Represents the X-axis position on the canvas. * @param { number } y - Represents the Y-axis position on the canvas. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ paint(canvas: drawing.Canvas, x: number, y: number): void; @@ -2204,7 +2057,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getStringIndices(range?: Range): Array; @@ -2212,7 +2065,7 @@ declare namespace text { * Gets the run glyph location and length. * @returns { Range } The run of glyph location and length, Range.start is location, Range.end is length. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getStringRange(): Range; @@ -2220,7 +2073,7 @@ declare namespace text { * Gets the run typographic bounds. * @returns { TypographicBounds } The run of typographic bounds. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getTypographicBounds(): TypographicBounds; @@ -2228,7 +2081,7 @@ declare namespace text { * Gets the run image bounds. * @returns { common2D.Rect } The run rect bounds. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ getImageBounds(): common2D.Rect; } @@ -2238,7 +2091,6 @@ declare namespace text { * @typedef RunMetrics * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface RunMetrics { /** @@ -2246,7 +2098,6 @@ declare namespace text { * @type { TextStyle } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ textStyle: TextStyle; @@ -2255,7 +2106,6 @@ declare namespace text { * @type { drawing.FontMetrics } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ fontMetrics: drawing.FontMetrics; } @@ -2265,7 +2115,6 @@ declare namespace text { * @typedef LineMetrics * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ interface LineMetrics { /** @@ -2273,7 +2122,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ startIndex: number; @@ -2282,7 +2130,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ endIndex: number; @@ -2291,7 +2138,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ ascent: number; @@ -2300,7 +2146,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ descent: number; @@ -2309,7 +2154,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ height: number; @@ -2318,7 +2162,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ width: number; @@ -2327,7 +2170,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ left: number; @@ -2336,7 +2178,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ baseline: number; @@ -2345,7 +2186,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ lineNumber: number; @@ -2354,7 +2194,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ topHeight: number; @@ -2365,7 +2204,6 @@ declare namespace text { * @type { Map } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ runMetrics: Map; } @@ -2377,7 +2215,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ function getSystemFontFullNamesByType(fontType: SystemFontType): Promise>; @@ -2390,7 +2228,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} */ function getFontDescriptorByFullName(fullName: string, fontType: SystemFontType): Promise; @@ -2403,7 +2241,7 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} */ function matchFontDescriptors(desc: FontDescriptor): Promise>; @@ -2412,7 +2250,6 @@ declare namespace text { * @typedef TextTab * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 */ interface TextTab { /** @@ -2421,7 +2258,6 @@ declare namespace text { * @type { TextAlign } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 */ alignment: TextAlign; @@ -2430,7 +2266,6 @@ declare namespace text { * @type { number } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 */ location: number; } -- Gitee From 09c288458cc94c9d7aa3b9537dc63245c654938f Mon Sep 17 00:00:00 2001 From: PengKejie Date: Wed, 25 Jun 2025 15:23:57 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=85=A8=E9=87=8F=E6=94=AF=E6=8C=81ArkTs1.?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: PengKejie --- api/@ohos.graphics.text.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index 4e96e67e48..70373a8731 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -1730,7 +1730,6 @@ declare namespace text { * @param { FontCollection } fontCollection - Font collection {@link FontCollection} * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 */ constructor(paragraphStyle: ParagraphStyle, fontCollection: FontCollection); -- Gitee From 9cb0c28a211aeefb0e91fc5aee0a9b4a95b39492 Mon Sep 17 00:00:00 2001 From: PengKejie Date: Wed, 25 Jun 2025 15:27:25 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=85=A8=E9=87=8F=E6=94=AF=E6=8C=81ArkTs1.?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: PengKejie --- api/@ohos.graphics.text.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index 70373a8731..aff980bf9a 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -2271,4 +2271,4 @@ declare namespace text { } } -export default text; +export default text; \ No newline at end of file -- Gitee From c3db53287b8079639a9d922ded643119127bf6eb Mon Sep 17 00:00:00 2001 From: PengKejie Date: Tue, 15 Jul 2025 20:03:46 +0800 Subject: [PATCH 4/4] number to int/long/double Signed-off-by: PengKejie --- api/@ohos.graphics.text.d.ts | 332 +++++++++++++++++------------------ 1 file changed, 166 insertions(+), 166 deletions(-) diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index aff980bf9a..a1e7b6620b 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -203,11 +203,11 @@ declare namespace text { /** * The thickness scale of decoration line. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - decorationThicknessScale?: number; + decorationThicknessScale?: double; } /** @@ -572,11 +572,11 @@ declare namespace text { point?: common2D.Point; /** * The value sets special effect radius of blurring text, it default is 0. - * @type { ?number } The value about radius of blur, it type is "double" + * @type { ?double } The value about radius of blur, it type is "double" * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - blurRadius?: number; + blurRadius?: double; } /** @@ -596,35 +596,35 @@ declare namespace text { /** * Radius in left top of rect style. - * @type { number } it is double type data + * @type { double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - leftTopRadius: number; + leftTopRadius: double; /** * Radius in right top of rect style. - * @type { number } it is double type data + * @type { double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - rightTopRadius: number; + rightTopRadius: double; /** * Radius in right bottom of rect style. - * @type { number } it is double type data + * @type { double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - rightBottomRadius: number; + rightBottomRadius: double; /** * Radius in left bottom of rect style. - * @type { number } it is double type data + * @type { double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - leftBottomRadius: number; + leftBottomRadius: double; } /** @@ -643,11 +643,11 @@ declare namespace text { name: string; /** * The value of font feature. - * @type { number } feature value + * @type { int } feature value * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - value: number; + value: int; } /** @@ -666,11 +666,11 @@ declare namespace text { axis: string; /** * The value of font variation. - * @type { number } variation value + * @type { double } variation value * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - value: number; + value: double; } /** @@ -731,35 +731,35 @@ declare namespace text { /** * Font size of text. - * @type { ?number } it is double type data + * @type { ?double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - fontSize?: number; + fontSize?: double; /** * Letter spacing of text. - * @type { ?number } it is double type data + * @type { ?double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - letterSpacing?: number; + letterSpacing?: double; /** * Word spacing of text. - * @type { ?number } it is double type data + * @type { ?double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - wordSpacing?: number; + wordSpacing?: double; /** * Height scale of text. - * @type { ?number } it is double type data + * @type { ?double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - heightScale?: number; + heightScale?: double; /** * Half leading of text. @@ -804,11 +804,11 @@ declare namespace text { /** * The offset distance that the underline of text. - * @type { ?number } it is double type data. + * @type { ?double } it is double type data. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - baselineShift?: number; + baselineShift?: double; /** * Text Style available font features. @@ -927,27 +927,27 @@ declare namespace text { /** * The size of the ascent plus descent in logical pixels. - * @type { ?number } it is double type data + * @type { ?double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - fontSize?: number; + fontSize?: double; /** * The minimum height of the strut, as a multiple of fontSize. - * @type { ?number } it is double type data + * @type { ?double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - height?: number; + height?: double; /** * The additional leading to apply to the strut as a multiple of Size. - * @type { ?number } it is double type data + * @type { ?double } it is double type data * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - leading?: number; + leading?: double; /** * Whether the strut height should be forced. @@ -1023,11 +1023,11 @@ declare namespace text { /** * Maximum number of lines. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - maxLines?: number; + maxLines?: double; /** * text segmentation strategy. @@ -1129,19 +1129,19 @@ declare namespace text { interface PlaceholderSpan { /** * The width of the placeholder. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - width: number; + width: double; /** * The height of the placeholder. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - height: number; + height: double; /** * Alignment mode of placeholder. @@ -1161,11 +1161,11 @@ declare namespace text { /** * Baseline offset of placeholder. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - baselineOffset: number; + baselineOffset: double; } /** @@ -1177,19 +1177,19 @@ declare namespace text { interface Range { /** * Left index. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - start: number; + start: int; /** * Right index. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - end: number; + end: int; } /** @@ -1292,19 +1292,19 @@ declare namespace text { /** * Font width - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'14','1.2':'20'} */ - width?: number; + width?: int; /** * Font slant, non-0 means italic. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'14','1.2':'20'} */ - italic?: number; + italic?: int; /** * Whether the font is monospaced @@ -1331,108 +1331,108 @@ declare namespace text { class Paragraph { /** * Calculates the positioning of all the glyphs. - * @param { number } width - Control how wide the text is allowed to be. + * @param { double } width - Control how wide the text is allowed to be. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - layoutSync(width: number): void; + layoutSync(width: double): void; /** * Calculates the positioning of all the glyphs. - * @param { number } width - Control how wide the text is allowed to be. + * @param { double } width - Control how wide the text is allowed to be. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - layout(width: number): Promise; + layout(width: double): Promise; /** * Paint the laid out text onto the supplied canvas at (x, y). * @param { drawing.Canvas } canvas - Object - * @param { number } x - Represents the X-axis position on the canvas. - * @param { number } y - Represents the Y-axis position on the canvas. + * @param { double } x - Represents the X-axis position on the canvas. + * @param { double } y - Represents the Y-axis position on the canvas. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - paint(canvas: drawing.Canvas, x: number, y: number): void; + paint(canvas: drawing.Canvas, x: double, y: double): void; /** * Draw the laid out text onto the supplied canvas along the path and offset. * @param { drawing.Canvas } canvas - Canvas used to carry the drawn content and drawing status. * @param { drawing.Path } path - Path used to determine the position of the text. - * @param { number } hOffset - Horizontal offset along the path. - * @param { number } vOffset - Vertical offset along the path. + * @param { double } hOffset - Horizontal offset along the path. + * @param { double } vOffset - Vertical offset along the path. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - paintOnPath(canvas: drawing.Canvas, path: drawing.Path, hOffset: number, vOffset: number): void; + paintOnPath(canvas: drawing.Canvas, path: drawing.Path, hOffset: double, vOffset: double): void; /** * Get max width of horizontal space this paragraph occupied. - * @returns { number } Max width of horizontal space. + * @returns { double } Max width of horizontal space. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getMaxWidth(): number; + getMaxWidth(): double; /** * Get height of horizontal space this paragraph occupies. - * @returns { number } Height of horizontal space this paragraph occupies. + * @returns { double } Height of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getHeight(): number; + getHeight(): double; /** * Get the longest line of horizontal space this paragraph occupies. - * @returns { number } The longest line of horizontal space this paragraph occupies. + * @returns { double } The longest line of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getLongestLine(): number; + getLongestLine(): double; /** * Get the longest line of horizontal space this paragraph occupies, and this horizontal space contains the width * of indent. - * @returns { number } The longest line with indent of horizontal space this paragraph occupies. + * @returns { double } The longest line with indent of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'13','1.2':'20'} */ - getLongestLineWithIndent(): number; + getLongestLineWithIndent(): double; /** * Get the min intrinsic width of horizontal space this paragraph occupies. - * @returns { number } The min intrinsic width of horizontal space this paragraph occupies. + * @returns { double } The min intrinsic width of horizontal space this paragraph occupies. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getMinIntrinsicWidth(): number; + getMinIntrinsicWidth(): double; /** * Get the max intrinsic width. - * @returns { number } Intrinsic Width. + * @returns { double } Intrinsic Width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getMaxIntrinsicWidth(): number; + getMaxIntrinsicWidth(): double; /** * Get the alphabetic baseline. - * @returns { number } Alphabetic Baseline. + * @returns { double } Alphabetic Baseline. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getAlphabeticBaseline(): number; + getAlphabeticBaseline(): double; /** * Get the ideographic baseline. - * @returns { number } Ideographic Baseline. + * @returns { double } Ideographic Baseline. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getIdeographicBaseline(): number; + getIdeographicBaseline(): double; /** * Get the rects for range. @@ -1455,48 +1455,48 @@ declare namespace text { /** * Get the glyph position at coordinate. - * @param { number } x - the positionX of typography to set. - * @param { number } y - the positionY of typography to set. + * @param { double } x - the positionX of typography to set. + * @param { double } y - the positionY of typography to set. * @returns { PositionWithAffinity } TextBlob object. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getGlyphPositionAtCoordinate(x: number, y: number): PositionWithAffinity; + getGlyphPositionAtCoordinate(x: double, y: double): PositionWithAffinity; /** * Find the start and end position of the word containing the glyphs of the given offset. - * @param { number } offset - offset value + * @param { double } offset - offset value * @returns { Range } The range value returned to the caller. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getWordBoundary(offset: number): Range; + getWordBoundary(offset: double): Range; /** * Get line count. - * @returns { number } The line count value returned to the caller. + * @returns { int } The line count value returned to the caller. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getLineCount(): number; + getLineCount(): int; /** * Get the line height of the specified line. - * @param { number } line - line number - * @returns { number } The line height value returned to the caller. + * @param { int } line - line number + * @returns { double } The line height value returned to the caller. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getLineHeight(line: number): number; + getLineHeight(line: int): double; /** * Get the line width of the specified line. - * @param { number } line - line number - * @returns { number } The line width value returned to the caller. + * @param { int } line - line number + * @returns { double } The line width value returned to the caller. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getLineWidth(line: number): number; + getLineWidth(line: int): double; /** * Return whether it exceed the maximum lines of typography. @@ -1516,13 +1516,13 @@ declare namespace text { /** * Returns the visible text on the line (excluding a possible ellipsis). - * @param { number } lineNumber - a line number + * @param { int } lineNumber - a line number * @param { boolean } includeSpaces - indicates if the whitespaces should be included * @returns { Range } The range of text. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getActualTextRange(lineNumber: number, includeSpaces: boolean): Range; + getActualTextRange(lineNumber: int, includeSpaces: boolean): Range; /** * Returns the array of line metrics for a line of text. @@ -1534,12 +1534,12 @@ declare namespace text { /** * Returns line metrics info for the line. - * @param { number } lineNumber - a line number + * @param { int } lineNumber - a line number * @returns { LineMetrics | undefined } line metrics. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getLineMetrics(lineNumber: number): LineMetrics | undefined; + getLineMetrics(lineNumber: int): LineMetrics | undefined; } /** @@ -1550,27 +1550,27 @@ declare namespace text { class LineTypeset { /** * Calculate the line breakpoint based on the width provided. - * @param { number } startIndex - The starting point for the line-break calculations. - * @param { number } width - The requested line-break width. - * @returns { number } A count of the characters from startIndex that would cause the line break. + * @param { int } startIndex - The starting point for the line-break calculations. + * @param { double } width - The requested line-break width. + * @returns { int } A count of the characters from startIndex that would cause the line break. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - getLineBreak(startIndex: number, width: number): number; + getLineBreak(startIndex: int, width: double): int; /** * Creates a text line object based on the text range provided. - * @param { number } startIndex - The starting index of the text range. - * @param { number } count - The characters count of the text range. + * @param { int } startIndex - The starting index of the text range. + * @param { int } count - The characters count of the text range. * @returns { TextLine } Text line object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - createLine(startIndex: number, count: number): TextLine; + createLine(startIndex: int, count: int): TextLine; } /** @@ -1606,11 +1606,11 @@ declare namespace text { interface PositionWithAffinity { /** * Position of text. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - position: number; + position: int; /** * Affinity of text. @@ -1782,11 +1782,11 @@ declare namespace text { /** * Add symbolId. - * @param { number } symbolId - Symbol Id + * @param { int } symbolId - Symbol Id * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - addSymbol(symbolId: number): void; + addSymbol(symbolId: int): void; } /** @@ -1798,43 +1798,43 @@ declare namespace text { interface TypographicBounds { /** * Distance Retained Above Baseline. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - ascent: number; + ascent: double; /** * The distance that remains below the baseline. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - descent: number; + descent: double; /** * Line Spacing. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - leading: number; + leading: double; /** * The total width of the typesetting border. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - width: number; + width: double; } /** * Offset callback function of caret. * * @typedef { function } CaretOffsetsCallback - * @param { number } offset - Character offset is traversed as an argument to the callback function. - * @param { number } index - Character index is traversed as an argument to the callback function. + * @param { int } offset - Character offset is traversed as an argument to the callback function. + * @param { int } index - Character index is traversed as an argument to the callback function. * @param { boolean } leadingEdge - Whether the current offset is at the character front, as an argument to the * callback function. * @returns { boolean } The return value of the user-defined callback function. If false is returned, the traversal @@ -1842,7 +1842,7 @@ declare namespace text { * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - type CaretOffsetsCallback = (offset: number, index: number, leadingEdge: boolean) => boolean; + type CaretOffsetsCallback = (offset: int, index: int, leadingEdge: boolean) => boolean; /** * The structure of text line that provides the basis of paragraph for graphics. @@ -1852,11 +1852,11 @@ declare namespace text { class TextLine { /** * Get the count of glyphs. - * @returns { number } The counts of glyphs. + * @returns { int } The counts of glyphs. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getGlyphCount(): number; + getGlyphCount(): int; /** * Get the range of text line. @@ -1877,16 +1877,16 @@ declare namespace text { /** * Paint the range of text line. * @param { drawing.Canvas } canvas - Canvas. - * @param { number } x - Represents the X-axis position on the canvas. - * @param { number } y - Represents the Y-axis position on the canvas. + * @param { double } x - Represents the X-axis position on the canvas. + * @param { double } y - Represents the Y-axis position on the canvas. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - paint(canvas: drawing.Canvas, x: number, y: number): void; + paint(canvas: drawing.Canvas, x: double, y: double): void; /** * Creates a truncated text line object. - * @param { number } width - The width of the truncated line. + * @param { double } width - The width of the truncated line. * @param { EllipsisMode } ellipsisMode - Text ellipsis mode, EllipsisMode:MIDDLE is not supported. * @param { string } ellipsis - Text ellipsis. * @returns { TextLine } Truncated text line object. @@ -1895,7 +1895,7 @@ declare namespace text { * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - createTruncatedLine(width: number, ellipsisMode: EllipsisMode, ellipsis: string): TextLine; + createTruncatedLine(width: double, ellipsisMode: EllipsisMode, ellipsis: string): TextLine; /** * Gets the text line typographic bounds. @@ -1915,33 +1915,33 @@ declare namespace text { /** * Gets the tail space width. - * @returns { number } The tail space width. + * @returns { double } The tail space width. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - getTrailingSpaceWidth(): number; + getTrailingSpaceWidth(): double; /** * Gets the string index of the given position. * @param { common2D.Point } point - The given position. - * @returns { number } The string index for a given position. + * @returns { int } The string index for a given position. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - getStringIndexForPosition(point: common2D.Point): number; + getStringIndexForPosition(point: common2D.Point): int; /** * Gets the offset of the given string index. - * @param { number } index - The given string index. - * @returns { number } The offset for a given string index. + * @param { int } index - The given string index. + * @returns { double } The offset for a given string index. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - getOffsetForStringIndex(index: number): number; + getOffsetForStringIndex(index: int): double; /** * Enumerate caret offset and index in text lines. @@ -1955,18 +1955,18 @@ declare namespace text { /** * Gets the text offset based on the given alignment factor and alignment width. - * @param { number } alignmentFactor - The coefficients that text needs to be aligned. + * @param { double } alignmentFactor - The coefficients that text needs to be aligned. * Less than or equal to 0 is left justified, 0.5 is center justified, * and greater than or equal to 1 is right justified. - * @param { number } alignmentWidth - The width of the text to be aligned. + * @param { double } alignmentWidth - The width of the text to be aligned. * Returns 0 if it is less than the actual width of the text. - * @returns { number } The offset of the aligned text. + * @returns { double } The offset of the aligned text. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - getAlignmentOffset(alignmentFactor: number, alignmentWidth: number): number; + getAlignmentOffset(alignmentFactor: double, alignmentWidth: double): double; } /** @@ -1977,31 +1977,31 @@ declare namespace text { class Run { /** * Gets the number of glyph. - * @returns { number } The number of glyph. + * @returns { int } The number of glyph. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getGlyphCount(): number; + getGlyphCount(): int; /** * Gets the glyph identifier for each character. - * @returns { Array } Glyph identifier. + * @returns { Array } Glyph identifier. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - getGlyphs(): Array; + getGlyphs(): Array; /** * Gets the range glyph identifier for each character. * @param { Range } range of run, range.start is the starting index of the run block, starting from 0. * range.end is run length, if range.start and range.end are set to 0, then get all of the current run. - * @returns { Array } Glyph identifier or undefined. + * @returns { Array } Glyph identifier or undefined. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - getGlyphs(range: Range): Array; + getGlyphs(range: Range): Array; /** * Gets the font position offset. @@ -2042,24 +2042,24 @@ declare namespace text { /** * Paint the laid out text onto the supplied canvas at (x, y). * @param { drawing.Canvas } canvas - Object. - * @param { number } x - Represents the X-axis position on the canvas. - * @param { number } y - Represents the Y-axis position on the canvas. + * @param { double } x - Represents the X-axis position on the canvas. + * @param { double } y - Represents the Y-axis position on the canvas. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - paint(canvas: drawing.Canvas, x: number, y: number): void; + paint(canvas: drawing.Canvas, x: double, y: double): void; /** * Gets the range of run glyph indices, the offset of the indices relative to the entire paragraph. * @param { Range } range of run, range.start is the starting index of the run block, starting from 0. * range.end is run length, if range.start range.and end are set to 0, then get all of the current run. - * @returns { Array } The glyph indices or undefined. + * @returns { Array } The glyph indices or undefined. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - getStringIndices(range?: Range): Array; + getStringIndices(range?: Range): Array; /** * Gets the run glyph location and length. @@ -2119,93 +2119,93 @@ declare namespace text { interface LineMetrics { /** * The indexes in the text buffer the line begins. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - startIndex: number; + startIndex: int; /** * The indexes in the text buffer the line ends. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - endIndex: number; + endIndex: int; /** * The height of the text rise, the distance from the baseline to the top of the character. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - ascent: number; + ascent: double; /** * The height of the text drop, the distance from the baseline to the bottom of the character. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - descent: number; + descent: double; /** * The height of the current line is `round(ascent + descent)`. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - height: number; + height: double; /** * Width of the line. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - width: number; + width: double; /** * The left edge of the line. The right edge can be obtained with `left + width`. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - left: number; + left: double; /** * The y position of the baseline for this line from the top of the paragraph. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - baseline: number; + baseline: double; /** * Zero indexed line number. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - lineNumber: number; + lineNumber: int; /** * Height from the top. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - topHeight: number; + topHeight: double; /** * Mapping between text index ranges and the FontMetrics associated with * them. The first run will be keyed under start_index. The metrics here. * are before layout and are the base values we calculate from. - * @type { Map } + * @type { Map } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12','1.2':'20'} */ - runMetrics: Map; + runMetrics: Map; } /** @@ -2263,11 +2263,11 @@ declare namespace text { /** * The position of the tab relative to the start of the line. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'18','1.2':'20'} */ - location: number; + location: double; } } -- Gitee