From d17a32e1b04706e09e8eb0ef05adf46e61f9b10c Mon Sep 17 00:00:00 2001 From: shiyueeee Date: Fri, 14 Oct 2022 17:00:04 +0800 Subject: [PATCH] Update color manager napi definition with error throw Signed-off-by: shiyueeee Change-Id: I26c8926e0c61440df7810bcbc0d7d9bece2fb7c3 --- api/@ohos.graphics.colorSpaceManager.d.ts | 27 ++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/api/@ohos.graphics.colorSpaceManager.d.ts b/api/@ohos.graphics.colorSpaceManager.d.ts index db7b533a3f..e73dccbdfb 100644 --- a/api/@ohos.graphics.colorSpaceManager.d.ts +++ b/api/@ohos.graphics.colorSpaceManager.d.ts @@ -71,63 +71,63 @@ import { AsyncCallback } from './basic'; } /** - * Describes the primary colors red, green, blue and white point - * in each color space map(x, y), in terms of real world chromaticities. + * Describes the primary colors red, green, blue and white point coordinated as (x, y) + * in color space, in terms of real world chromaticities. * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ interface ColorSpacePrimaries { /** - * x value of red color + * Coordinate value x of red color * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ redX: number; /** - * y value of red color + * Coordinate value y of red color * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ redY: number; /** - * x value of green color + * Coordinate value x of green color * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ greenX: number; /** - * y value of green color + * Coordinate value y of green color * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ greenY: number; /** - * x value of blue color + * Coordinate value x of blue color * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ blueX: number; /** - * y value of blue color + * Coordinate value y of blue color * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ blueY: number; /** - * x value of white point + * Coordinate value x of white point * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ whitePointX: number; /** - * y value of white point + * Coordinate value y of white point * @since 9 * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core */ @@ -143,18 +143,21 @@ import { AsyncCallback } from './basic'; /** * Get color space type. * @since 9 + * @throws {BusinessError} 18600001 - If param value is abnormal */ getColorSpaceName(): ColorSpace; /** * Get white point(x, y) of color space. * @since 9 + * @throws {BusinessError} 18600001 - If param value is abnormal */ getWhitePoint(): Array; /** * Get gamma value of color space. * @since 9 + * @throws {BusinessError} 18600001 - If param value is abnormal */ getGamma(): number; } @@ -163,6 +166,8 @@ import { AsyncCallback } from './basic'; * Create a color space manager by proviced color space type. * @param colorSpaceName Indicates the type of color space * @since 9 + * @throws {BusinessError} 401 - If param is invalid + * @throws {BusinessError} 18600001 - If param value is abnormal */ function create(colorSpaceName: ColorSpace): ColorSpaceManager; @@ -171,6 +176,8 @@ import { AsyncCallback } from './basic'; * @param primaries Indicates the customized color primaries * @param gamma Indicates display gamma value * @since 9 + * @throws {BusinessError} 401 - If param is invalid + * @throws {BusinessError} 18600001 - If param value is abnormal */ function create(primaries: ColorSpacePrimaries, gamma: number): ColorSpaceManager; } -- Gitee