webstorm怎么添加图片
这里要一张图片,怎么添加的
var backgroundImage = new Image();
backgroundImage.src = "brick-s.jpg";
backgroundImage.onload = function () {
var pattern = context.createPattern(backgroundImage ,"repeat");
context.fillStyle = pattern;
context.font = "bold 100px Arial";
context.fillText("canvas!" ,40 ,650);