feat: add meatureText api

master
XuPeng 2021-07-12 11:20:25 +08:00
parent 187c9c6633
commit e713117b92
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,10 @@
const example = {}
example.measureText = function (context) {
const data = context.measureText('123')
console.log(data)
}
example.rotate = function (context) {
context.beginPath()
context.rotate(10 * Math.PI / 180)