canvas.style.height = canvas.parentNode.style.height = div.style.height =
        Math.floor(height) + 'px';