double fx = factX * fsXNew / fsXOld;
double fy = factY * fsYNew / fsYOld;
List<ErasePatch> erasePatches = subPictures[i].getErasePatch();
if (!erasePatches.isEmpty()) {
for (int j = 0; j < erasePatches.size(); j++) {
ErasePatch ep = erasePatches.get(j);
int x = (int)(ep.x * fx + 0.5);
int y = (int)(ep.y * fy + 0.5);
int width = (int)(ep.width * fx + 0.5);
int height = (int)(ep.height * fy + 0.5);
erasePatches.set(j, new ErasePatch(x, y, width, height));
}
}
}
// 2nd run: validate times (not fully necessary, but to avoid overlap due to truncation