The technique only works correctly with rectangular selections (2d scale, translations). Note: zooming in has the same cost as brute force, mostly due to the per-pixel cpu rendering. Supports floats!