+ const Vector<int> total = to - from;
+ const Vector<int> over = total % size;
+ const Vector<int> target = from + (total - over);
+
+ for (destRect.y = from.Y(); destRect.y < target.Y(); destRect.y += size.Y()) {
+ for (destRect.x = from.X(); destRect.x < target.X(); destRect.x += size.X()) {
+ SDL_BlitSurface(surface, &srcRect, dest, &destRect);
+ }
+ }
+ if (over.X() > 0) {
+ destRect.x = target.X();
+ srcRect.w = over.X();