ctx2.drawImage(video, 960, 0, 300,200),960的坐标无法定位
发布于 3 年前 作者 jing26 513 次浏览 来自 官方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()

回到顶部