lijinfengde123 81d0cdcff6 update readme
Signed-off-by: lijinfengde123 <1037761763@qq.com>
2022-03-11 14:33:30 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 16:58:15 +08:00
2022-03-11 13:07:54 +08:00
2022-03-11 14:33:30 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 18:26:29 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 16:58:15 +08:00
2022-03-08 21:38:10 +08:00
2022-03-08 17:05:04 +08:00
2022-03-09 12:56:14 +08:00
2022-03-11 14:33:30 +08:00
2022-03-11 14:33:30 +08:00
2022-03-08 16:58:15 +08:00

ScreenShot

Introduction

The ScreenShot application is a preset system application in OpenHarmony, which provides users with the function of capturing the current screen and saving the current picture.

Architecture diagram

content

/applications/standard/screenshot
     ├── entry             # entry module directory
     ├── common            # Common tool class directory
     ├── build.gradle      # Global build configuration file
     ├── settings.gradle   # Compile the module configuration file
     ├── LICENSE           # License file
     ├── signature         # Certificate file directory
     ├── features          # subcomponent directory
     │ ├── screenshot      # screenshot component
     │ ├── screenShotModel # Save screenshots, etc.
     ├── product           # ScreenShot general function catalog

sign

  1. For each module under product/phone, configure signingConfigs in build.gradle

  2. Put screenshot.p7b in the signature directory on the corresponding path configured in the build.gradle directory.

Instructions

Create a small screen capture window to display pictures through create, the sample code is as follows

// Create a small screen capture window to display pictures
window.create(context, windowName, WINDOW_TYPE).then((win) => {
  win.moveTo(0, WINDOW_Y).then(() => {
    win.resetSize(dis.width * ZOOM_RATIO, dis.height * ZOOM_RATIO).then(() => {
      win.loadContent(INDEX_PAGE).then(() => {
      })
    })
  })
}, (error) => {
  Log.showInfo(TAG, " window createFailed, error.code = " + error.code)
})


// Take a screenshot of the current screen, the return value can be directly displayed on the control
Screenshot.save().then(async (data) => {
  if (!!data) {
    show();
  }
}).catch((err) => {
  Log.showInfo(TAG, `save err`);
})
    

Relevant warehouse

Relevant warehouse

applications_screenshot

Description
No description provided
Readme Pixar 2.8 MiB
Languages
TypeScript 35.6%
JavaScript 33.1%
Batchfile 16.4%
Shell 14.9%