Reducing flicker when painting rubber band rectangle over image