From 34e91a83e9704a00908ab90c29312d3e0775d458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E5=B1=B9?= Date: Sun, 27 Oct 2024 16:45:24 +0800 Subject: [PATCH] add interface of waveGradient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈思屹 --- api/@internal/component/ets/common.d.ts | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 26a436a7b2..90408ddeeb 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -17234,6 +17234,20 @@ declare class CommonMethod { */ linearGradientBlur(value: number, options: LinearGradientBlurOptions): T; + /** + * Adds the content wave gradient color effect for the current component. + * + * @param { number } radius - the radius of wave gradient. + * @param { number } translateX - x coordinate of wave gradient center. + * @param { number } translateY - y coordinate of wave gradient center. + * @param { WaveGradientColorOptions } options - the wave gradient color options. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 14 + */ + waveGradientColor(radius: number, translateX: number, translateY: number, options: WaveGradientColorOptions): T; + /** * Component motion blur interface. * @@ -21009,6 +21023,19 @@ declare interface OverlayOffset { */ declare type FractionStop = [ number, number ]; +/** + * Defines the segment of wave gradient color. + * The first element in the tuple means the color. + * The second element means the position that the color fills. + * The range of this value is [0,1]. A value of 1 means region ending position and 0 means region starting position. + * + * @typedef { [ ResourceColor, number ] } ColorFractionStop + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 14 + */ +declare type ColorFractionStop = [ ResourceColor, number ]; + /** * CommonShapeMethod * @@ -21731,6 +21758,35 @@ declare interface LinearGradientBlurOptions { direction: GradientDirection; } +/** + * Wave Gradient Color Interface + * + * @interface WaveGradientColorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 14 + */ +declare interface WaveGradientColorOptions { + /** + * Color and its percentage of whole wave gradient. + * + * @type { ColorFractionStop[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 14 + */ + colorFractionStops: ColorFractionStop[]; + /** + * Direction of wave gradient color. + * + * @type { GradientDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 14 + */ + direction: GradientDirection; +} + /** * Define motion blur anchor coordinates. * -- Gitee