`scaleFactor` is a double, but `size` is int. `size` should be made double