+ src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST;
+ src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST;
+ }
+
+ // look along the diagonals
+ const int max_wh(std::max(w,h));
+ const Real inc_x((br[0]-tl[0])/max_wh),inc_y((br[1]-tl[1])/max_wh);
+ pos1[0] = pos2[0] = tl[0]; pos1[1] = tl[1]; pos2[1] = br[1];
+ for (x = 0; x < max_wh; x++, pos1[0] += inc_x, pos2[0] = pos1[0], pos1[1]+=inc_y, pos2[1]-=inc_y)
+ {
+ src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST;
+ src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST;