Skip to content

Commit b92fa01

Browse files
committed
update
1 parent d782e82 commit b92fa01

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

graphics/basic.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,27 @@ guid:图形 id 对象,用于唯一标识图形。
2121

2222
## parentIndex
2323

24-
父节点 id。格式同 guid
24+
父节点 id,以及当前节点在父节点下的位置
2525

2626
fig 的数据结构是拍平的一维数组,加载时需要根据 parentIndex 还原为图形树结构。
2727

28+
```json
29+
"parentIndex": {
30+
"guid": {
31+
"sessionID": 0,
32+
"localID": 0
33+
},
34+
"position": "~"
35+
},
36+
```
37+
38+
position 使用了 [Fractional indexing](https://mp.weixin.qq.com/s?__biz=MzI0NTc2NTEyNA%3D%3D&mid=2247487763&idx=1&sn=7cb696d006d66521d4456bd4f67bec4d&chksm=e948d478de3f5d6e5f8269616453d75176bf472a6b8a6b6f1eeebce75fe0cf01f17838db7207&scene=21&cur_album_id=2965704900049485826#wechat_redirect) 的顺序一致性算法。
39+
2840
## type
2941

3042
图形类型。
3143

32-
对于矩形,type 为 `RECTANGLE`
44+
比如矩形,type 为 `RECTANGLE`
3345

3446
## name
3547

@@ -41,7 +53,7 @@ fig 的数据结构是拍平的一维数组,加载时需要根据 parentIndex
4153

4254
## locked
4355

44-
是否锁定,锁定的图形不可选择,不可通过光标移动。
56+
是否被锁定,被锁定的图形不可选择,不可通过光标移动。
4557

4658
![](<../static/lock-visible-name.jpg>)
4759

@@ -51,7 +63,35 @@ fig 的数据结构是拍平的一维数组,加载时需要根据 parentIndex
5163

5264
## blendMode
5365

54-
混合模式,表示当前节点和其下的图层以何种形式混合。默认为 PASS_THROUGH(穿透)。
66+
混合模式,表示当前节点和其下的图层以何种形式混合。
67+
68+
默认为 PASS_THROUGH(穿透)。
69+
70+
```json
71+
{
72+
"BlendMode": {
73+
"PASS_THROUGH": 0,
74+
"NORMAL": 1,
75+
"DARKEN": 2,
76+
"MULTIPLY": 3,
77+
"LINEAR_BURN": 4,
78+
"COLOR_BURN": 5,
79+
"LIGHTEN": 6,
80+
"SCREEN": 7,
81+
"LINEAR_DODGE": 8,
82+
"COLOR_DODGE": 9,
83+
"OVERLAY": 10,
84+
"SOFT_LIGHT": 11,
85+
"HARD_LIGHT": 12,
86+
"DIFFERENCE": 13,
87+
"EXCLUSION": 14,
88+
"HUE": 15,
89+
"SATURATION": 16,
90+
"COLOR": 17,
91+
"LUMINOSITY": 18
92+
}
93+
}
94+
```
5595

5696
## size
5797

graphics/rectangle.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
## rectangleTopLeftCornerRadius / rectangleTopRightCornerRadius / rectangleBottomLeftCornerRadius / rectangleBottomRightCornerRadius
1313

14+
基础属性有个 cornerRadius 表示半径,但是是给每个角都设置为一个值。
15+
16+
我们希望矩形可以单独设置每个圆角,所以有了这几个属性。
17+
1418
矩形 4 个圆角半径值。
1519

1620
- rectangleTopLeftCornerRadius:左上角圆角半径;

0 commit comments

Comments
 (0)