blob: 3b5f9e0e25e11e08cab1ec8543c6257abb3b5d1a [file] [log] [blame]
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var backImageCanvas;
function prepareBackground() {
var backImage = document.getElementById('backImage');
backImageCanvas = document.createElement('canvas');
backImageCanvas.width = canvasWidth;
backImageCanvas.height = canvasHeight;
var backContext = backImageCanvas.getContext('2d');
backContext.drawImage(backImage, 0, 0, canvasWidth, canvasHeight);
}
function drawBackground() {
canvasContext.drawImage(backImageCanvas, 0, 0);
}