support resizing of canvas

works with antialiasing disabled. Part of issue #9.