微信小程序canvas绘制的形状在调用drawimage后覆盖了
可能是因为您在绘制形状之后没有调用context.stroke()或context.fill()方法,使得形状没有被实际绘制出来,而在调用drawImage()方法后被覆盖掉了。请尝试在绘制形状之后调用context.stroke()或context.fill()方法,或者在绘制形状时使用context.fill()或context.stroke()方法,以确保形状被正确绘制。同时,您也可以调整drawImage()方法的参数,使得绘制的图像不会覆盖形状。
原文地址: https://www.cveoy.top/t/topic/huNC 著作权归作者所有。请勿转载和采集!