华为 MATE9 fillRect() 宽度或高度是负数时没有画
发布于 5 年前 作者 tao80 18833 次浏览 来自 问答

  onReady: function ()

  {

      var canvas=wx.createCanvasContext(‘chart’);

      canvas.fillStyle = ‘rgb(255,0,0)’;

      canvas.fillRect(0,0,50,50);

      canvas.fillStyle = ‘rgb(255,255,0)’;     

      canvas.fillRect(20,20,-20,-20);  //在华为 MATE9 真机没有画出来

      canvas.draw();

  },

2 回复

提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

wechatide://minicode/HXo5Dhmz7s3W机型:华为 MATE9微信版本6.7.3

回到顶部