From 2e7b6a34d938e557342404dee3eb5ed3953c044c Mon Sep 17 00:00:00 2001 From: yangfei Date: Thu, 22 Sep 2022 17:10:26 +0800 Subject: [PATCH] =?UTF-8?q?window=20=E5=AD=90=E7=B3=BB=E7=BB=9F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangfei Change-Id: I99d25ec77d6e79604b736ffbbcffe9b519edb9c6 --- api/@ohos.screenshot.d.ts | 10 +++++++++- api/@ohos.window.d.ts | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/api/@ohos.screenshot.d.ts b/api/@ohos.screenshot.d.ts index 4928ee300f..210ff03b84 100644 --- a/api/@ohos.screenshot.d.ts +++ b/api/@ohos.screenshot.d.ts @@ -29,7 +29,15 @@ declare namespace screenshot { * @permission ohos.permission.CAPTURE_SCREEN * @since 7 */ - function save(options?: ScreenshotOptions, callback: AsyncCallback): void; + function save(options: ScreenshotOptions, callback: AsyncCallback): void; + + /** + * Takes a screenshot and saves it as a PixelMap object. + * @param options Screenshot options, which consist of screenRect, imageSize, and rotation. You need to set these parameters + * @permission ohos.permission.CAPTURE_SCREEN + * @since 7 + */ + function save(callback: AsyncCallback): void; /** * Takes a screenshot and saves it as a PixelMap object. diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index f171e3ae82..515bfbc8e5 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -13,10 +13,10 @@ * limitations under the License. */ -/// +/// import { AsyncCallback, Callback } from './basic' ; -import { Context } from './application/BaseContext'; +import Context from './application/BaseContext'; import { LocalStorage } from 'StateManagement'; import image from './@ohos.multimedia.image'; import rpc from './@ohos.rpc'; -- Gitee