Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function renderExitButton() {
ctx.font = "35px Helvetica";
ctx.fillStyle = "#bbbbbb";
var offset = 10;
var text = "Exit";
var metrics = ctx.measureText(text);
var text_width = metrics.width;
var text_height = metrics.height;
ctx.fillText("EXIT", offset + text_width + assets["exit.png"].width * 0.7, canvas_height - offset * 1.4);
ctx.drawImage(assets["exit.png"], offset, canvas_height - offset - assets["exit.png"].height);
}
function renderExitButton() {
ctx.font = "35px Helvetica";
ctx.fillStyle = "#bbbbbb";
var offset = 10;
var text = "Exit";
var metrics = ctx.measureText(text);
var text_width = metrics.width;
var text_height = metrics.height;
ctx.fillText("EXIT", offset + text_width + assets["exit.png"].width * 0.7, canvas_height - offset * 1.4);
ctx.drawImage(assets["exit.png"], offset, canvas_height - offset - assets["exit.png"].height);
}