• 2022-05-31
    清除某一离屏canvas的左半部分的内容,然后绘制于当前canvas,下方需补全的代码是?// 此处为清除某一离屏canvas的左半部分的内容----- 补全代码处 -----context.drawImage(offcanvas, 0,0);
    A: offcanvas.clearRect(0, 0, canvas.width/2, canvas.height);
    B: offcanvas.getContext('2d').clearRect(0, 0, canvas.width/2, canvas.height);
    C: offcanvas.clearRect(0, 0, offcanvas.width/2, offcanvas.height);
    D: offcanvas.getContext('2d').clearRect(0, 0, offcanvas.width/2, offcanvas.height);