Instead of just working for image surface, this should now work for all bounded surfaces. Test included.