// +0.1: to work against a later integer conversion that might round down
double deltaWidth = size.getWidth() + 0.001 - modified.width;
double deltaHeight = size.getHeight() + 0.001 - modified.height;
Root root = leaf.getRoot();
deltaWidth /= root.getWidthFactor();
deltaHeight /= root.getHeightFactor();
return new ResizeRequest(
deltaWidth,
deltaHeight,
size.isWidthSet() ? 1 : -1,