未验证 提交 d39f5501 编写于 作者: O openharmony_ci 提交者: Gitee

!20551 获取系统内置裁切路径的方法

Merge pull request !20551 from 末日拿铁/master
......@@ -159,3 +159,22 @@ getMask(): DrawableDescriptor;
drawable: DrawableDescriptor = (<LayeredDrawableDescriptor> (this.resManager.getDrawableDescriptor($r('app.media.drawable')
.id))).getMask();
```
## LayeredDrawableDescriptor.getMashClipPath
static getMashClipPath(): string
LayeredDrawableDescriptor的静态方法,获取系统内置的裁切路径参数。
**系统能力:** SystemCapability.ArkUI.ArkUI.Full
**返回值:**
| 类型 | 说明 |
| ---------------------------------------- | -------------------- |
| string | 返回裁切路径的命令字符串 |
**示例:**
```ts
Image($r('app.media.testImg'))
.width('200px').height('200px')
.clip(new Path({commands:LayeredDrawableDescriptor.getMaskClipPath()}))
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册