From 683d474dd65272ef23811b10c926134052715cdf Mon Sep 17 00:00:00 2001 From: royce-ls Date: Thu, 12 Jun 2025 18:09:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=93=9D=E9=BB=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E3=80=91changeHdrApi20to19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: royce-ls Change-Id: Ie619a61a24a9bf642a38bc3c6af804056b25a8d7 --- api/@internal/component/ets/image.d.ts | 22 +-- api/@ohos.arkui.drawableDescriptor.d.ts | 174 +----------------------- 2 files changed, 12 insertions(+), 184 deletions(-) diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 9cb84274e2..7c96b917b5 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -1905,6 +1905,17 @@ declare class ImageAttribute extends CommonMethod { */ resizable(value: ResizableOptions): ImageAttribute; + /** + * Set the quality enhancement level of image. + * + * @param { ResolutionQuality } imageQuality + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 12 + */ + enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; + /** * Sets whether to secure sensitive information on widgets. * @@ -1921,17 +1932,6 @@ declare class ImageAttribute extends CommonMethod { */ privacySensitive(supported: boolean): ImageAttribute; - /** - * Set the quality enhancement level of image. - * - * @param { ResolutionQuality } imageQuality - * @returns { ImageAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; - /** * Sets the display orientation of the image content. * diff --git a/api/@ohos.arkui.drawableDescriptor.d.ts b/api/@ohos.arkui.drawableDescriptor.d.ts index 6c7ff4b6a3..158347feea 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -20,63 +20,6 @@ import image from './@ohos.multimedia.image'; -/** - * Indicates the return result of the data to be fetched. - * - * @typedef DrawableDescriptorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorResult { - /** - * DrawableDescriptor width.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly width?: number; - - /** - * DrawableDescriptor height.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly height?: number; -} - -/** - * DrawableDescriptor's option which is used in constructor. - * - * @typedef DrawableDescriptorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorOptions { - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; -} - /** * Use the DrawableDescriptor class to get drawable image. * @@ -133,54 +76,6 @@ export class DrawableDescriptor { * @since 12 */ getPixelMap(): image.PixelMap; - - /** - * Get original width of drawable object. - * - * @returns { number } Return the width of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalWidth(): number; - - /** - * Get original height of drawable object. - * - * @returns { number } Return the height of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalHeight(): number; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { Promise } Return the promise returned by the funciton. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetch(): Promise; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { DrawableDescriptorResult } Return the result of the DrawableDescriptor object. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchSync(): DrawableDescriptorResult; } /** @@ -347,17 +242,6 @@ export class PixelMapDrawableDescriptor extends DrawableDescriptor { * @since 12 */ constructor(src?: image.PixelMap); - - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap | ResourceStr } src - Indicates the resource to create PixelMapDrawableDescriptor. - * @param { DrawableDescriptorOptions } options - Indicates the option to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(src?: image.PixelMap | ResourceStr, options?: DrawableDescriptorOptions); } /** @@ -390,17 +274,6 @@ declare interface AnimationOptions { * @since 12 */ iterations?: number; - - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; } /** @@ -424,49 +297,4 @@ export class AnimatedDrawableDescriptor extends DrawableDescriptor { * @since 12 */ constructor(pixelMaps: Array, options?: AnimationOptions); - - /** - * Creates a new AnimatedDrawableDescriptor. - * @param { Array | ResourceStr } pixelMaps - Indicates the resource to create AnimatedDrawableDescriptor. - * @param { ?AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(pixelMaps: Array | ResourceStr, options?: AnimationOptions); - - /** - * Get the running status of animation. - * - * @returns { boolean } Return the running status of animation. - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - isRunning(): boolean; - - /** - * Start the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - start(): void; - - /** - * Stop the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - stop(): void; -} +} \ No newline at end of file -- Gitee