replace Math.* to bitwise functions for better performance.
fix text alignment again, when fullscreen is used.
clearRect is used for cleaning canvas.