canvasProps
概览
canvasProps 适用于 canvas。
相关文档
字段表
Key |
类型 |
默认值 |
Binding |
UI 影响 / 限制 |
|---|---|---|---|---|
|
|
|
|
声明式绘制命令列表 |
CanvasCommand 字段表
Key |
类型 |
默认值 |
说明 |
|---|---|---|---|
|
string |
|
命令类型 |
|
integer px |
|
起点或矩形 X 坐标 |
|
integer px |
|
起点或矩形 Y 坐标 |
|
integer px |
|
宽度 |
|
integer px |
|
高度 |
|
string, |
|
命令颜色 |
CanvasCommand type
当前公开命令类型:
值 |
含义 |
使用字段 |
|---|---|---|
|
用 |
|
|
在 |
|
width / height 当前会被 parser 接收,但命令执行暂未使用。未列出的 type 会被忽略。
示例
"canvasProps": {
"commands": [
{
"type": "fill",
"color": "#3b82f6"
},
{
"type": "pixel",
"x": 12,
"y": 8,
"width": 0,
"height": 0,
"color": "#ffffff"
}
]
}