Fix the image viewer when painting in a clipped region.