From fb3b5bd10362fec3136966fd960ff214c258f5b9 Mon Sep 17 00:00:00 2001 From: liuyongkai2 Date: Wed, 10 Sep 2025 15:24:40 +0800 Subject: [PATCH] =?UTF-8?q?styledString=E5=92=8CImageSpan=E6=94=AF?= =?UTF-8?q?=E6=8C=81svg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyongkai2 --- api/@internal/component/ets/image_span.d.ts | 13 ++++++++++ .../component/ets/styled_string.d.ts | 24 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/api/@internal/component/ets/image_span.d.ts b/api/@internal/component/ets/image_span.d.ts index 3bce91cbbc..9fe11a55c9 100644 --- a/api/@internal/component/ets/image_span.d.ts +++ b/api/@internal/component/ets/image_span.d.ts @@ -158,6 +158,19 @@ declare class ImageSpanAttribute extends BaseSpan { */ onComplete(callback: ImageCompleteCallback): ImageSpanAttribute; + /** + * Sets the color filter effect on the image span. + * + * @param { boolean } enable - switch + * @returns { ImageSpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 21 + */ + supportSvg2(enable: boolean): ImageSpanAttribute; + /** * Sets a callback which is triggered when an exception occurs during image loading. * The field of "message" returned in the callback carries the detailed information of failed image loading. diff --git a/api/@internal/component/ets/styled_string.d.ts b/api/@internal/component/ets/styled_string.d.ts index 45b24924e6..dc2f65e83e 100644 --- a/api/@internal/component/ets/styled_string.d.ts +++ b/api/@internal/component/ets/styled_string.d.ts @@ -1842,6 +1842,18 @@ declare class ImageAttachment { * @arkts 1.1&1.2 */ readonly colorFilter?: ColorFilterType; + + /** + * Gets the color filter effect on the image span. + * + * @type { ?boolean } - the imageAttachmentLayoutStyle of the StyledString or undefined + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + readonly supportSvg2?: boolean; } /** @@ -1939,6 +1951,18 @@ declare interface ResourceImageAttachmentOptions { * @arkts 1.1&1.2 */ syncLoad?: boolean; + + /** + * Sets the color filter effect on the image span. + * The default parameter type is bool, and the default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + supportSvg2?: boolean; } /** -- Gitee