We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const dp = createDrawPoster({ selector: 'canvas', }) dp.mount() console.log(dp.canvas) // undefined dp.canvas.width = 300 dp.canvas.height = 300 dp.draw((ctx) => { ctx.fillStyle = '#F4F4F4' ctx.fillRect(0, 0, 300, 300) }) // 测试本地/网络地址 const url = '/static/tabbar/wode.jpg' /* 网络图片 */ // 测试案例一:绘制图片(矩形) dp.draw(async (ctx) => { await ctx.drawImage(url, 0, 150, 150, 150) await ctx.drawImage(url, 150, 150, 150, 150) }) // 测试案例二:绘制图片(圆角) dp.draw(async (ctx) => { await ctx.drawRoundImage(url, 0, 0, 150, 150, 100) await ctx.drawRoundImage(url, 150, 0, 150, 150, 100) }) // 创建本地地址 this.imgUrl = await dp.create() console.log('创建地址:', { url: this.imgUrl }) }, }
The text was updated successfully, but these errors were encountered:
插件版本3.0.2
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: