matrix scales to window width and height