Skip to content

Commit d6371a6

Browse files
committed
update setBackgroundImage
1 parent 82bc1c1 commit d6371a6

File tree

4 files changed

+53
-19
lines changed

4 files changed

+53
-19
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,18 @@ Vue.use(Fabric);
219219
| ------ | ------ | ----------- |
220220
| flag | Boolean | 画布是否可以框选 |
221221

222-
#### setBackgroundImage(url) 设置画布背景图片
222+
#### setBackgroundImage(options) 设置画布背景图片
223223

224-
| params | Type | Description |
224+
| options | Type | Description |
225225
| ------ | ------ | ------------ |
226-
| url | String | 背景图片 Url |
226+
| imgUrl | String | 背景图片 Url |
227+
| angle | Number | 旋转角度 |
228+
| opacity | Number | 背景图片透明度 |
229+
| width | Number | 默认为canvas宽度 背景图片宽度 |
230+
| height | Number | 默认为canvas高度 背景图片高度 |
231+
| scaleX | Number | 水平缩放 |
232+
| scaleY | Number | 垂直缩放 |
233+
| crossOrigin | String | 可为'anonymous',加载跨域图片 |
227234

228235
#### renderAll() 重新渲染画布
229236

0 commit comments

Comments
 (0)