摘要: 线性渐变API: ctx.createLinearGradient(double x1, double y1, double x2, double y2) 创建一个渐变实例 (x1, y1) 渐变的起始点 (x2, y2) 渐变的终止点 gradient.addColorStop(offset: d 阅读全文
posted @ 2018-11-02 15:35 生活总得有些仪式感 阅读(2867) 评论(0) 推荐(0) 编辑
摘要: 使用的API: ctx.strokeRect(x, y, width, height) 给一个矩形描边 ctx.fillRect(x, y, width, height) 填充一个矩形 ctx.clearRect(x, y, width, height) 清除矩形区域 ctx.lineJoin = 阅读全文
posted @ 2018-11-02 14:50 生活总得有些仪式感 阅读(304) 评论(0) 推荐(0) 编辑