ctx2.drawImage(video, 960, 0, 300,200),960的坐标无法定位

发布于 5 年前作者 jing26678 次浏览最后编辑 5 年前来自 issues


      wx.createSelectorQuery().selectAll('#cvs2').node(res => {

        console.log('select canvas', res)

        const ctx2 = res[0].node.getContext('2d')

        res[0].node.width = w * dpr

        res[0].node.height = h * dpr


        setInterval(() => {

          ctx2.drawImage(video, 960, 0, 320, 240, 0, 0, w * dpr,h * dpr);

        },  1000 / 30)

      }).exec()

0 回复
暂无回复