摘要: 1、背景图等比: context.drawImage('.png', 0, 0, 图片原始宽度的一半, 图片原始高度的一半, 0, 0, 图片原始宽度, 图片原始高度); 2、字体垂直对齐方式:context.setTextBaseline('middle'); 3、context.setFillS 阅读全文
posted @ 2021-04-14 12:12 Running00 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 圆角矩形 drawRoundedRect(ctx, x, y, width, height, radius, type) { ctx.moveTo(x, y + radius); ctx.beginPath(); ctx.arc(x + radius, y + radius, radius, Mat 阅读全文
posted @ 2021-04-14 12:10 Running00 阅读(103) 评论(0) 推荐(0) 编辑