public static Rectangle scaleTo1x( double scaleFactor, int x, int y, int width, int height ) {
			double px = (x * scaleFactor);
			double py = (y * scaleFactor);

			double newX = normalize( px );
			double newY = normalize( py );
			double newWidth  = normalize( px + (width * scaleFactor) ) - newX;
			double newHeight = normalize( py + (height * scaleFactor) ) - newY;

			return new Rectangle( (int) Math.floor( newX ), (int) Math.floor( newY ), (int) newWidth, (int) newHeight );
		}
Scales a rectangle in the same way as the JRE does in
sun.java2d.pipe.PixelToParallelogramConverter.fillRectangle(),
which is used by Graphics.fillRect().

This is a copy of HiDPIUtils.scale()
flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/FlatPaintingStringTest.java