图上为开发者工具上生成的图片。
图上为iphone6sp 生成的图片,头像变成方的了。
以下为代码,麻烦官方帮忙看下是什么问题。
canvas: function () {
var that = this
var context = wx.createCanvasContext('ass')
var avatarurl_widths = 150;
var avatarurl_heigths = 150;
var avatarurl_xs = that.data.width * 0.5 - 75;
var avatarurl_ys = that.data.height * 0.63;
var avatarurl_width = 70;
var avatarurl_heigth = 70;
var avatarurl_x = that.data.width * 0.5-35;
var avatarurl_y = 5;
context.drawImage(that.data.downbj, 0, 0, that.data.width, that.data.height);
context.setTextAlign('center')
context.setFontSize(20)
context.setFillStyle('#fd943f')
context.fillText('用' + that.data.shopname, that.data.width * 0.5, 110)
context.save();
context.beginPath();
context.arc(avatarurl_widths / 2 + avatarurl_xs, avatarurl_heigths / 2 + avatarurl_ys, avatarurl_widths / 2, 0, Math.PI * 2, false);
context.clip();
context.drawImage(that.data.downimage, avatarurl_xs, avatarurl_ys, avatarurl_widths, avatarurl_heigths);
context.restore();
context.arc(avatarurl_width / 2 + avatarurl_x, avatarurl_heigth / 2 + avatarurl_y, avatarurl_width / 2, 0, Math.PI * 2, false);
context.clip();
context.drawImage(that.data.downpt, avatarurl_x, avatarurl_y, avatarurl_width, avatarurl_heigth);
context.restore();
context.draw();
context.stroke()
},
你好,感谢反馈,我们会在后续版本中进行修复,另外建议后续经过搜索后再提问,以提高问题解答的效率。
wechat 6.6.7导致canvas执行结果错误
https://developers.weixin.qq.com/blogdetail?action=get_post_info&docid=000e463db405e0d0f6c61a13356000&highline=canvas
同事问,你们这什么时候修复。还能不能干活了?
是最新的微信版本还存在问题?如若问题还存在,麻烦单独发帖,提供机型、代码片段等利于定位问题的信息
IOS版本是多少,在上机调试模式下,是否有错误提示?
没有提示任何错误