提交 b88fd394 编写于 作者: L lixia7819

增加安全水印接口说明文档

Signed-off-by: Nlixia7819 <lixia110@huawei.com>
上级 7f81a3ea
...@@ -1056,6 +1056,7 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -1056,6 +1056,7 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
| ID| Error Message| | ID| Error Message|
| ------- | -------------------------------------------- | | ------- | -------------------------------------------- |
| 1300002 | This window state is abnormal. |
| 1300003 | This window manager service works abnormally. | | 1300003 | This window manager service works abnormally. |
**Example** **Example**
...@@ -1124,11 +1125,10 @@ image.createPixelMap(color, initializationOptions) ...@@ -1124,11 +1125,10 @@ image.createPixelMap(color, initializationOptions)
}); });
} catch (exception) { } catch (exception) {
console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception)); console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception));
} }
}) }).catch((err) => {
.catch((err) => { console.error(`createPixelMap failed. Cause: `+ JSON.stringify(err));
console.error(`createPixelMap failed, code is ${err.code}, message is ${err.message}`); });
});
``` ```
## window.setWaterMarkImage<sup>10+</sup> ## window.setWaterMarkImage<sup>10+</sup>
...@@ -1186,11 +1186,10 @@ image.createPixelMap(color, initializationOptions) ...@@ -1186,11 +1186,10 @@ image.createPixelMap(color, initializationOptions)
}); });
} catch (exception) { } catch (exception) {
console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception)); console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception));
} }
}) }).catch((err) => {
.catch((err) => { console.error(`createPixelMap failed. Cause: `+ JSON.stringify(err));
console.error(`createPixelMap failed, code is ${err.code}, message is ${err.message}`); });
});
``` ```
## window.create<sup>(deprecated)</sup> ## window.create<sup>(deprecated)</sup>
......
...@@ -1125,11 +1125,10 @@ image.createPixelMap(color, initializationOptions) ...@@ -1125,11 +1125,10 @@ image.createPixelMap(color, initializationOptions)
}); });
} catch (exception) { } catch (exception) {
console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception)); console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception));
} }
}) }).catch((err) => {
.catch((err) => { console.error(`createPixelMap failed. Cause: `+ JSON.stringify(err));
console.error(`createPixelMap failed, code is ${err.code}, message is ${err.message}`); });
});
``` ```
## window.setWaterMarkImage<sup>10+</sup> ## window.setWaterMarkImage<sup>10+</sup>
...@@ -1188,11 +1187,10 @@ image.createPixelMap(color, initializationOptions) ...@@ -1188,11 +1187,10 @@ image.createPixelMap(color, initializationOptions)
}); });
} catch (exception) { } catch (exception) {
console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception)); console.error('Failed to show watermark image. Cause: ' + JSON.stringify(exception));
} }
}) }).catch((err) => {
.catch((err) => { console.error(`createPixelMap failed. Cause: `+ JSON.stringify(err));
console.error(`createPixelMap failed, code is ${err.code}, message is ${err.message}`); });
});
``` ```
## window.create<sup>(deprecated)</sup> ## window.create<sup>(deprecated)</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册