Ensure state dimensions are always integers
Resize canvas to fill the window (remove all other content)