Optimize drawing when zoomed in. Fixes #521.