【发布时间】:2015-03-21 00:33:13
【问题描述】:
我正在使用ctx.fillText 函数在我的屏幕上绘制文本,但它似乎没有出现。
overlay("rgb(50, 50, 200)", "This is the beginning screen", 48, "black", "center", centerx, centery)
var overlay = function(colour, text, font, size, fontColour, oreintation, x, y){
ctx.font = size + "px " + font + " " + fontColour
ctx.textAlign = oreintation
ctx.fillStyle = colour
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height)
ctx.fillText(text, x, y)
}
【问题讨论】:
标签: javascript canvas text