提交 931c2d96 编写于 作者: W wusongqing

updated docs

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 9cb423c7
# MissionSnapshot # MissionSnapshot
> ![icon-note.gif](public_sys-resources/icon-note.gif)**NOTE** > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Provides snapshot of a mission. Provides the snapshot of a mission.
## Modules to Import ## Modules to Import
......
...@@ -69,7 +69,7 @@ Checks whether this application is undergoing a stability test. This API uses a ...@@ -69,7 +69,7 @@ Checks whether this application is undergoing a stability test. This API uses a
isRamConstrainedDevice(): Promise\<boolean>; isRamConstrainedDevice(): Promise\<boolean>;
Checks whether this application is running in a RAM constrained device. This API uses a promise to return the result. Checks whether this application is running on a RAM constrained device. This API uses a promise to return the result.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
...@@ -77,7 +77,7 @@ Checks whether this application is running in a RAM constrained device. This API ...@@ -77,7 +77,7 @@ Checks whether this application is running in a RAM constrained device. This API
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| Promise&lt;boolean&gt; | Promise used to return whether the application is running in a RAM constrained device. If the application is running in a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.| | Promise&lt;boolean&gt; | Promise used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.|
**Example** **Example**
...@@ -93,7 +93,7 @@ Checks whether this application is running in a RAM constrained device. This API ...@@ -93,7 +93,7 @@ Checks whether this application is running in a RAM constrained device. This API
isRamConstrainedDevice(callback: AsyncCallback\<boolean>): void; isRamConstrainedDevice(callback: AsyncCallback\<boolean>): void;
Checks whether this application is running in a RAM constrained device. This API uses an asynchronous callback to return the result. Checks whether this application is running on a RAM constrained device. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Ability.AbilityRuntime.Core **System capability**: SystemCapability.Ability.AbilityRuntime.Core
...@@ -101,7 +101,7 @@ Checks whether this application is running in a RAM constrained device. This API ...@@ -101,7 +101,7 @@ Checks whether this application is running in a RAM constrained device. This API
| Name| Type| Mandatory| Description| | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | No| Callback used to return whether the application is running in a RAM constrained device. If the application is running in a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.| | callback | AsyncCallback&lt;boolean&gt; | No| Callback used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.|
**Example** **Example**
...@@ -214,4 +214,4 @@ Obtains information about the running processes. This API uses an asynchronous c ...@@ -214,4 +214,4 @@ Obtains information about the running processes. This API uses an asynchronous c
| pid<sup>8+</sup> | Read only | number | No | Process ID. | | pid<sup>8+</sup> | Read only | number | No | Process ID. |
| uid<sup>8+</sup> | Read only | number | No | User ID.| | uid<sup>8+</sup> | Read only | number | No | User ID.|
| processName<sup>8+</sup> | Read only | string | No | Process name.| | processName<sup>8+</sup> | Read only | string | No | Process name.|
| bundleNames<sup>8+</sup> | Read only | Array\<string> | No | **bundleName** array in the running process.| | bundleNames<sup>8+</sup> | Read only | Array\<string> | No | **bundleName** array in the running processes.|
...@@ -104,7 +104,7 @@ pixelmap.readPixelsToBuffer(readBuffer).then(() => { ...@@ -104,7 +104,7 @@ pixelmap.readPixelsToBuffer(readBuffer).then(() => {
readPixelsToBuffer(dst: ArrayBuffer, callback: AsyncCallback\<void>): void readPixelsToBuffer(dst: ArrayBuffer, callback: AsyncCallback\<void>): void
Reads image pixel map data and writes the data to an **ArrayBuffer**. This API uses a callback to return the result. Reads image pixel map data and writes the data to an **ArrayBuffer**. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -126,7 +126,7 @@ pixelmap.readPixelsToBuffer(readBuffer, () => { ...@@ -126,7 +126,7 @@ pixelmap.readPixelsToBuffer(readBuffer, () => {
readPixels(area: PositionArea): Promise\<void> readPixels(area: PositionArea): Promise\<void>
Reads pixel map data in an area. This API uses a promise to return the data read. Reads image pixel map data in an area. This API uses a promise to return the data read.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -156,7 +156,7 @@ pixelmap.readPixels(area).then((data) => { ...@@ -156,7 +156,7 @@ pixelmap.readPixels(area).then((data) => {
readPixels(area: PositionArea, callback: AsyncCallback\<void>): void readPixels(area: PositionArea, callback: AsyncCallback\<void>): void
Reads image pixel map data in an area. This API uses a callback to return the data read. Reads image pixel map data in an area. This API uses an asynchronous callback to return the data read.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -200,7 +200,7 @@ Writes image pixel map data to an area. This API uses a promise to return the op ...@@ -200,7 +200,7 @@ Writes image pixel map data to an area. This API uses a promise to return the op
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ------------------------------ | ---- | -------------------- | | ------ | ------------------------------ | ---- | -------------------- |
| area | [PositionArea](#positionarea7) | Yes | Area to which the pixel map data will be written.| | area | [PositionArea](#positionarea7) | Yes | Area to which the image pixel map data will be written.|
**Return value** **Return value**
...@@ -250,7 +250,7 @@ image.createPixelMap(color, opts) ...@@ -250,7 +250,7 @@ image.createPixelMap(color, opts)
writePixels(area: PositionArea, callback: AsyncCallback\<void>): void writePixels(area: PositionArea, callback: AsyncCallback\<void>): void
Writes image pixel map data to an area. This API uses a callback to return the operation result. Writes image pixel map data to an area. This API uses an asynchronous callback to return the operation result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -258,7 +258,7 @@ Writes image pixel map data to an area. This API uses a callback to return the o ...@@ -258,7 +258,7 @@ Writes image pixel map data to an area. This API uses a callback to return the o
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------------------------------ | ---- | ------------------------------ | | --------- | ------------------------------ | ---- | ------------------------------ |
| area | [PositionArea](#positionarea7) | Yes | Area to which the pixel map data will be written. | | area | [PositionArea](#positionarea7) | Yes | Area to which the image pixel map data will be written. |
| callback: | AsyncCallback\<void> | Yes | Callback used to return the operation result. If the operation fails, an error message is returned.| | callback: | AsyncCallback\<void> | Yes | Callback used to return the operation result. If the operation fails, an error message is returned.|
**Example** **Example**
...@@ -308,7 +308,7 @@ pixelMap.writeBufferToPixels(colorBuffer).then(() => { ...@@ -308,7 +308,7 @@ pixelMap.writeBufferToPixels(colorBuffer).then(() => {
writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void
Reads image data in an **ArrayBuffer** and writes the data to a **PixelMap** object. This API uses a callback to return the result. Reads image data in an **ArrayBuffer** and writes the data to a **PixelMap** object. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -335,7 +335,7 @@ pixelMap.writeBufferToPixels(colorBuffer, function(err) { ...@@ -335,7 +335,7 @@ pixelMap.writeBufferToPixels(colorBuffer, function(err) {
getImageInfo(): Promise\<ImageInfo> getImageInfo(): Promise\<ImageInfo>
Obtains pixel map information about this image. This API uses a promise to return the information. Obtains pixel map information of this image. This API uses a promise to return the information.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -359,7 +359,7 @@ pixelMap.getImageInfo().then(function(info) { ...@@ -359,7 +359,7 @@ pixelMap.getImageInfo().then(function(info) {
getImageInfo(callback: AsyncCallback\<ImageInfo>): void getImageInfo(callback: AsyncCallback\<ImageInfo>): void
Obtains pixel map information about this image. This API uses a callback to return the information. Obtains pixel map information of this image. This API uses an asynchronous callback to return the information.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -379,7 +379,7 @@ pixelmap.getImageInfo((imageInfo) => {}) ...@@ -379,7 +379,7 @@ pixelmap.getImageInfo((imageInfo) => {})
getBytesNumberPerRow(): number getBytesNumberPerRow(): number
Obtains the number of bytes in each line of the image pixel map. Obtains the number of bytes per line of the image pixel map.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -387,7 +387,7 @@ Obtains the number of bytes in each line of the image pixel map. ...@@ -387,7 +387,7 @@ Obtains the number of bytes in each line of the image pixel map.
| Type | Description | | Type | Description |
| ------ | -------------------- | | ------ | -------------------- |
| number | Number of bytes in each line.| | number | Number of bytes per line.|
**Example** **Example**
...@@ -440,7 +440,7 @@ Releases this **PixelMap** object. This API uses a promise to return the result. ...@@ -440,7 +440,7 @@ Releases this **PixelMap** object. This API uses a promise to return the result.
release(callback: AsyncCallback\<void>): void release(callback: AsyncCallback\<void>): void
Releases this **PixelMap** object. This API uses a callback to return the result. Releases this **PixelMap** object. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -522,7 +522,7 @@ Provides APIs to obtain image information. Before calling any API in **ImageSour ...@@ -522,7 +522,7 @@ Provides APIs to obtain image information. Before calling any API in **ImageSour
getImageInfo(index: number, callback: AsyncCallback\<ImageInfo>): void getImageInfo(index: number, callback: AsyncCallback\<ImageInfo>): void
Obtains information about an image with the specified index. This API uses a callback to return the information. Obtains information about an image with the specified index. This API uses an asynchronous callback to return the information.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -543,7 +543,7 @@ imageSourceApi.getImageInfo(0,(error, imageInfo) => {}) ...@@ -543,7 +543,7 @@ imageSourceApi.getImageInfo(0,(error, imageInfo) => {})
getImageInfo(callback: AsyncCallback\<ImageInfo>): void getImageInfo(callback: AsyncCallback\<ImageInfo>): void
Obtains information about this image. This API uses a callback to return the information. Obtains information about this image. This API uses an asynchronous callback to return the information.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -620,7 +620,7 @@ imageSourceApi.getImageProperty("BitsPerSample") ...@@ -620,7 +620,7 @@ imageSourceApi.getImageProperty("BitsPerSample")
getImageProperty(key:string, callback: AsyncCallback\<string>): void getImageProperty(key:string, callback: AsyncCallback\<string>): void
Obtains the value of a property with the specified index in this image. This API uses a callback to return the result. Obtains the value of a property with the specified index in this image. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -641,7 +641,7 @@ imageSourceApi.getImageProperty("BitsPerSample",(error,data) => {}) ...@@ -641,7 +641,7 @@ imageSourceApi.getImageProperty("BitsPerSample",(error,data) => {})
getImageProperty(key:string, options: GetImagePropertyOptions, callback: AsyncCallback\<string>): void getImageProperty(key:string, options: GetImagePropertyOptions, callback: AsyncCallback\<string>): void
Obtains the value of a property in this image. This API uses a callback to return the property value in a string. Obtains the value of a property in this image. This API uses an asynchronous callback to return the property value in a string.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -663,7 +663,7 @@ imageSourceApi.getImageProperty("BitsPerSample",property,(error,data) => {}) ...@@ -663,7 +663,7 @@ imageSourceApi.getImageProperty("BitsPerSample",property,(error,data) => {})
createPixelMap(options?: DecodingOptions): Promise\<PixelMap> createPixelMap(options?: DecodingOptions): Promise\<PixelMap>
Creates a **PixelMap** object based on image decoding parameters. This API uses a callback to return the result. Creates a **PixelMap** object based on image decoding parameters. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -690,7 +690,7 @@ imageSourceApi.createPixelMap().then(pixelmap => {}) ...@@ -690,7 +690,7 @@ imageSourceApi.createPixelMap().then(pixelmap => {})
createPixelMap(callback: AsyncCallback\<PixelMap>): void createPixelMap(callback: AsyncCallback\<PixelMap>): void
Creates a **PixelMap** object based on the default parameters. This API uses a callback to return the result. Creates a **PixelMap** object based on the default parameters. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -710,7 +710,7 @@ imageSourceApi.createPixelMap(pixelmap => {}) ...@@ -710,7 +710,7 @@ imageSourceApi.createPixelMap(pixelmap => {})
createPixelMap(options: DecodingOptions, callback: AsyncCallback\<PixelMap>): void createPixelMap(options: DecodingOptions, callback: AsyncCallback\<PixelMap>): void
Creates a **PixelMap** object based on image decoding parameters. This API uses a callback to return the result. Creates a **PixelMap** object based on image decoding parameters. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -731,7 +731,7 @@ imageSourceApi.createPixelMap(decodingOptions, pixelmap => {}) ...@@ -731,7 +731,7 @@ imageSourceApi.createPixelMap(decodingOptions, pixelmap => {})
release(callback: AsyncCallback\<void>): void release(callback: AsyncCallback\<void>): void
Releases this **ImageSource** instance. This API uses a callback to return the result. Releases this **ImageSource** instance. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -801,7 +801,7 @@ Provide APIs to pack images. Before calling any API in **ImagePacker**, you must ...@@ -801,7 +801,7 @@ Provide APIs to pack images. Before calling any API in **ImagePacker**, you must
packing(source: ImageSource, option: PackingOption, callback: AsyncCallback<Array\<ArrayBuffer>>): void packing(source: ImageSource, option: PackingOption, callback: AsyncCallback<Array\<ArrayBuffer>>): void
Packs an image. This API uses a callback to return the result. Packs an image. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -854,7 +854,7 @@ imagePackerApi.packing(imageSourceApi, packOpts) ...@@ -854,7 +854,7 @@ imagePackerApi.packing(imageSourceApi, packOpts)
packing(source: PixelMap, option: PackingOption, callback: AsyncCallback\<ArrayBuffer>): void packing(source: PixelMap, option: PackingOption, callback: AsyncCallback\<ArrayBuffer>): void
Packs an image. This API uses a callback to return the result. Packs an image. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -907,7 +907,7 @@ imagePackerApi.packing(pixelMapApi, packOpts) ...@@ -907,7 +907,7 @@ imagePackerApi.packing(pixelMapApi, packOpts)
release(callback: AsyncCallback\<void>): void release(callback: AsyncCallback\<void>): void
Releases this **ImagePacker** instance. This API uses a callback to return the result. Releases this **ImagePacker** instance. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Image **System capability**: SystemCapability.Multimedia.Image
...@@ -996,8 +996,10 @@ Enumerates pixel map formats. ...@@ -996,8 +996,10 @@ Enumerates pixel map formats.
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ----------- | ---------------------------------- | ---- | ---- | -------------- | | ----------- | ---------------------------------- | ---- | ---- | -------------- |
| alphaType<sup>9+</sup> | [AlphaType](#alphatype9) | Yes | Yes | Alpha type. |
| editable | boolean | Yes | Yes | Whether the image is editable. | | editable | boolean | Yes | Yes | Whether the image is editable. |
| pixelFormat | [PixelMapFormat](#pixelmapformat7) | Yes | Yes | Pixel map format. | | pixelFormat | [PixelMapFormat](#pixelmapformat7) | Yes | Yes | Pixel map format. |
| scaleMode<sup>9+</sup> | [ScaleMode](#scalemode9) | Yes | Yes | Scale mode. |
| size | [Size](#size) | Yes | Yes | Image size.| | size | [Size](#size) | Yes | Yes | Image size.|
## DecodingOptions<sup>7+</sup> ## DecodingOptions<sup>7+</sup>
...@@ -1058,7 +1060,7 @@ Describes the exchangeable image file format (Exif) information of an image. ...@@ -1058,7 +1060,7 @@ Describes the exchangeable image file format (Exif) information of an image.
| Name | Default Value | Description | | Name | Default Value | Description |
| ----------------- | ----------------- | -------------------- | | ----------------- | ----------------- | -------------------- |
| BITS_PER_SAMPLE | "BitsPerSample" | Number of bytes in each pixel. | | BITS_PER_SAMPLE | "BitsPerSample" | Number of bits per pixel. |
| ORIENTATION | "Orientation" | Image orientation. | | ORIENTATION | "Orientation" | Image orientation. |
| IMAGE_LENGTH | "ImageLength" | Image length. | | IMAGE_LENGTH | "ImageLength" | Image length. |
| IMAGE_WIDTH | "ImageWidth" | Image width. | | IMAGE_WIDTH | "ImageWidth" | Image width. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册