Skip to content

Commit c5005d3

Browse files
author
Simon he
committed
chore: update
1 parent 682ebec commit c5005d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ import {
1313

1414
```
1515

16+
## DotTextCanvas
17+
- 根据文字返回一个点阵的canvas
18+
- 入参:text: string // 内容, fontSize: number // 文字大小, color: string // 颜色, fontWeight: number // 字体粗细
19+
```javascript
20+
const dotText = DotTextCanvas('hello', 20, '#000', 1)
21+
document.body.appendChild(dotText.canvas)
22+
```
23+
1624
## getLru
1725
- 记录有限的数据,删除最久未访问的数据
1826
- 参数: maxSize, 存储的最大数据量 (默认为50)

0 commit comments

Comments
 (0)