草庐IT

strokeText

全部标签

html - Canvas context.fillText() 与 context.strokeText()

除了第一个使用context.fillStyle之外,context.fillText()和context.strokeText()之间还有什么区别吗?而后者使用context.strokeStyle。他们没有添加context.textStyle属性的原因是什么? 最佳答案 varcanvas=document.getElementById("myCanvas");varctx=canvas.getContext("2d");ctx.fillStyle='red';ctx.strokeStyle='green'ctx.lineWi

html - Canvas context.fillText() 与 context.strokeText()

除了第一个使用context.fillStyle之外,context.fillText()和context.strokeText()之间还有什么区别吗?而后者使用context.strokeStyle。他们没有添加context.textStyle属性的原因是什么? 最佳答案 varcanvas=document.getElementById("myCanvas");varctx=canvas.getContext("2d");ctx.fillStyle='red';ctx.strokeStyle='green'ctx.lineWi